summaryrefslogtreecommitdiffstats
path: root/vertex.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-11-03 12:29:23 -0800
committeryum <yum.food.vr@gmail.com>2025-11-03 12:29:23 -0800
commit4bcd85c9a2a6ede722aea3a403a2a09d9d7cb84d (patch)
treeb548503038fc59c2acde846efa34c28c0bf41f6a /vertex.cginc
parent46b30ed654b00746c131e575232f6f012d4e5004 (diff)
add norm conversion to vertex undeform path
Diffstat (limited to 'vertex.cginc')
-rw-r--r--vertex.cginc9
1 files changed, 9 insertions, 0 deletions
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;