From 4bcd85c9a2a6ede722aea3a403a2a09d9d7cb84d Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 3 Nov 2025 12:29:23 -0800 Subject: add norm conversion to vertex undeform path --- vertex.cginc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vertex.cginc') diff --git a/vertex.cginc b/vertex.cginc index 634abb1..9cdbead 100644 --- a/vertex.cginc +++ b/vertex.cginc @@ -292,6 +292,15 @@ void undeform_normal(inout float3 objPos, inout float3 objNorm, inout float3 obj cursor -= 1; } #endif +#if defined(_VERTEX_DEFORMATION_NORM_CONVERSION) + if (cursor > 0) { + VERTEX_DEFORM_NORM_CONVERSION_PREAMBLE; + float3 stageInput = posHistory[cursor - 1]; + norm_conversion_undeform_normal(stageInput, objNorm, objTan, input_k, output_k, t); + objPos = stageInput; + cursor -= 1; + } +#endif #if defined(_VERTEX_DEFORMATION_XY_TUBE) if (cursor > 0) { VERTEX_DEFORM_XY_TUBE_PREAMBLE; -- cgit v1.2.3