From 93f27e3a8545fef6ccc293d033e5f422ed821215 Mon Sep 17 00:00:00 2001 From: yum Date: Sun, 2 Nov 2025 09:19:50 -0800 Subject: generalize norm conversion code --- 3ner.cginc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '3ner.cginc') diff --git a/3ner.cginc b/3ner.cginc index 28facdc..24cf52d 100644 --- a/3ner.cginc +++ b/3ner.cginc @@ -266,8 +266,6 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target { i.tangent.xyz = UnityObjectToWorldNormal(i.tangent.xyz); i.normal *= facing ? 1 : -1; - i.normal = normalize(i.normal); - i.tangent.xyz = normalize(i.tangent.xyz); Pbr pbr = getPbr(i); #if defined(_UNLIT) @@ -278,7 +276,7 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target { GetLighting(i, pbr, light_data); #if 0 - float c = light_data.direct.NoL; + float c = light_data.common.NoV; return float4(c,c,c,1); #endif return brdf(pbr, light_data); -- cgit v1.2.3