From d2090f73f3e4f08cdbd3c3b82eb7f3ba9f459dd0 Mon Sep 17 00:00:00 2001 From: yum Date: Sun, 12 Oct 2025 13:48:35 -0700 Subject: add plane<->tube deformation shader --- vertex.cginc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'vertex.cginc') diff --git a/vertex.cginc b/vertex.cginc index 0140ff2..fd08bbb 100644 --- a/vertex.cginc +++ b/vertex.cginc @@ -5,19 +5,15 @@ void deform(inout float3 objPos) { #if defined(_CUSTOM31_TUBES) - float A = _Custom31_Tubes_A; - float k = _Custom31_Tubes_k; - float t = _Time[2] * _Custom31_Tubes_tk; - objPos = c31_deform(objPos, A, k, t); + float t = _Custom31_Tubes_t; + objPos = plane_to_tube(objPos, t); #endif // _CUSTOM31_TUBES } void deform_normal(float3 objPos, inout float3 objNorm, inout float3 objTan) { #if defined(_CUSTOM31_TUBES) - float A = _Custom31_Tubes_A; - float k = _Custom31_Tubes_k; - float t = _Time[2] * _Custom31_Tubes_tk; - c31_deform_normal(objPos, objNorm, objTan, A, k, t); + float t = _Custom31_Tubes_t; + plane_to_tube_normal(objPos, objNorm, objTan, t); #endif // _CUSTOM31_TUBES } -- cgit v1.2.3