summaryrefslogtreecommitdiffstats
path: root/vertex.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-10-12 21:52:50 -0700
committeryum <yum.food.vr@gmail.com>2025-10-12 21:52:50 -0700
commit228e555dbd07dd1a332a07770106dfd98f918c9b (patch)
tree8f058e1c897ba818dedc2564676f0278eddce128 /vertex.cginc
parenta4bf31470f7e2855f13d922e3e7ad1c7767d9afd (diff)
fornite update
Diffstat (limited to 'vertex.cginc')
-rw-r--r--vertex.cginc54
1 files changed, 35 insertions, 19 deletions
diff --git a/vertex.cginc b/vertex.cginc
index 58c5209..730adfe 100644
--- a/vertex.cginc
+++ b/vertex.cginc
@@ -1,51 +1,67 @@
#ifndef __VERTEX_INC
#define __VERTEX_INC
-#include "custom31.hlsl"
+#include "vertex_deformation.hlsl"
void deform(inout float3 objPos) {
float t_eps = 1e-9;
-#if defined(_CUSTOM31_XZ_TUBE)
+#if defined(_VERTEX_DEFORMATION_XZ_TUBE)
{
- float t = clamp(_Custom31_XZ_Tube_t, -1+t_eps, 1-t_eps);;
+ float t = clamp(_Vertex_Deformation_XZ_Tube_t, -1+t_eps, 1-t_eps);;
objPos = plane_to_tube(objPos.xyz, t);
}
-#endif // _CUSTOM31_XZ_TUBE
-#if defined(_CUSTOM31_YZ_TUBE)
+#endif // _VERTEX_DEFORMATION_XZ_TUBE
+#if defined(_VERTEX_DEFORMATION_YZ_TUBE)
{
- float t = clamp(_Custom31_YZ_Tube_t, -1+t_eps, 1-t_eps);
+ float t = clamp(_Vertex_Deformation_YZ_Tube_t, -1+t_eps, 1-t_eps);
objPos = plane_to_tube(objPos.yxz, t);
objPos = objPos.yxz;
}
-#endif // _CUSTOM31_YZ_TUBE
-#if defined(_CUSTOM31_XY_TUBE)
+#endif // _VERTEX_DEFORMATION_YZ_TUBE
+#if defined(_VERTEX_DEFORMATION_XY_TUBE)
{
- float t = clamp(_Custom31_XY_Tube_t, -1+t_eps, 1-t_eps);
+ float t = clamp(_Vertex_Deformation_XY_Tube_t, -1+t_eps, 1-t_eps);
objPos = plane_to_tube(objPos.xzy, t);
objPos = objPos.xzy;
}
-#endif // _CUSTOM31_XY_TUBE
+#endif // _VERTEX_DEFORMATION_XY_TUBE
+#if defined(_VERTEX_DEFORMATION_SEAL)
+ {
+ float A = _Vertex_Deformation_Seal_A;
+ float k = _Vertex_Deformation_Seal_k;
+ float t = _Time[3] * _Vertex_Deformation_Seal_t;
+ objPos = seal(objPos.xyz, A, k, t);
+ }
+#endif // _VERTEX_DEFORMATION_SEAL
}
void deform_normal(float3 objPos, inout float3 objNorm, inout float3 objTan) {
-#if defined(_CUSTOM31_XZ_TUBE)
+#if defined(_VERTEX_DEFORMATION_XZ_TUBE)
{
- float t = _Custom31_XZ_Tube_t;
+ float t = _Vertex_Deformation_XZ_Tube_t;
plane_to_tube_normal(objPos, objNorm, objTan, t);
}
-#endif // _CUSTOM31_XZ_TUBE
-#if defined(_CUSTOM31_YZ_TUBE)
+#endif // _VERTEX_DEFORMATION_XZ_TUBE
+#if defined(_VERTEX_DEFORMATION_YZ_TUBE)
{
- float t = _Custom31_YZ_Tube_t;
+ float t = _Vertex_Deformation_YZ_Tube_t;
plane_to_tube_normal(objPos.yxz, objNorm.yxz, objTan.yxz, t);
}
-#endif // _CUSTOM31_YZ_TUBE
-#if defined(_CUSTOM31_XY_TUBE)
+#endif // _VERTEX_DEFORMATION_YZ_TUBE
+#if defined(_VERTEX_DEFORMATION_XY_TUBE)
{
- float t = _Custom31_XY_Tube_t;
+ float t = _Vertex_Deformation_XY_Tube_t;
plane_to_tube_normal(objPos.xzy, objNorm.xzy, objTan.xzy, t);
}
-#endif // _CUSTOM31_XY_TUBE
+#endif // _VERTEX_DEFORMATION_XY_TUBE
+#if defined(_VERTEX_DEFORMATION_SEAL)
+ {
+ float A = _Vertex_Deformation_Seal_A;
+ float k = _Vertex_Deformation_Seal_k;
+ float t = _Time[0] * _Vertex_Deformation_Seal_t;
+ seal_normal(objPos, objNorm, objTan, A, k, t);
+ }
+#endif // _VERTEX_DEFORMATION_SEAL
}
void propagateObjPos(inout v2f i) {