diff options
| author | yum <yum.food.vr@gmail.com> | 2025-10-12 13:48:35 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-10-12 13:48:35 -0700 |
| commit | d2090f73f3e4f08cdbd3c3b82eb7f3ba9f459dd0 (patch) | |
| tree | c4ca182ee132d01331e0d8d9bd95530cab61a6d0 /vertex.cginc | |
| parent | b056c6935128dd7e4a9572a946bab5c4bc08da32 (diff) | |
add plane<->tube deformation shader
Diffstat (limited to 'vertex.cginc')
| -rw-r--r-- | vertex.cginc | 12 |
1 files changed, 4 insertions, 8 deletions
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 } |
