diff options
Diffstat (limited to 'texture_utils.cginc')
| -rw-r--r-- | texture_utils.cginc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/texture_utils.cginc b/texture_utils.cginc index 5909c72..9d7bf2f 100644 --- a/texture_utils.cginc +++ b/texture_utils.cginc @@ -24,7 +24,9 @@ float2 get_uv_by_channel(v2f i, uint which_channel) { } } -#define UV_SCOFF(i, tex_st, which_channel) get_uv_by_channel(i, round(which_channel)) * (tex_st).xy + (tex_st).zw +#define UV_SCOFF_IMPL(uv, tex_st) (uv) * (tex_st).xy + (tex_st).zw + +#define UV_SCOFF(i, tex_st, which_channel) UV_SCOFF_IMPL(get_uv_by_channel(i, round(which_channel)), tex_st) #endif // __TEXTURE_UTILS_INC |
