From 7aae547b83c94ff3ecf62524809ecb21d6061d33 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 23 Apr 2025 16:30:01 -0700 Subject: tweak how decal rotation works --- texture_utils.cginc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'texture_utils.cginc') 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 -- cgit v1.2.3