summaryrefslogtreecommitdiffstats
path: root/vertex.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-10-12 15:00:47 -0700
committeryum <yum.food.vr@gmail.com>2025-10-12 15:00:47 -0700
commit6ac3da1b0bd363d70c2f6e4b7b921f2f929dedac (patch)
treecc09ebbdd7bd101bccd2f9d594279f5f66370c63 /vertex.cginc
parentd2090f73f3e4f08cdbd3c3b82eb7f3ba9f459dd0 (diff)
add uv scroll, aniso16, and finish tubes
Diffstat (limited to 'vertex.cginc')
-rw-r--r--vertex.cginc46
1 files changed, 38 insertions, 8 deletions
diff --git a/vertex.cginc b/vertex.cginc
index fd08bbb..2f5b5f5 100644
--- a/vertex.cginc
+++ b/vertex.cginc
@@ -4,17 +4,47 @@
#include "custom31.hlsl"
void deform(inout float3 objPos) {
-#if defined(_CUSTOM31_TUBES)
- float t = _Custom31_Tubes_t;
- objPos = plane_to_tube(objPos, t);
-#endif // _CUSTOM31_TUBES
+#if defined(_CUSTOM31_XZ_TUBE)
+ {
+ float t = _Custom31_XZ_Tube_t;
+ objPos = plane_to_tube(objPos.xyz, t);
+ }
+#endif // _CUSTOM31_XZ_TUBE
+#if defined(_CUSTOM31_YZ_TUBE)
+ {
+ float t = _Custom31_YZ_Tube_t;
+ objPos = plane_to_tube(objPos.yxz, t);
+ objPos = objPos.yxz;
+ }
+#endif // _CUSTOM31_YZ_TUBE
+#if defined(_CUSTOM31_XY_TUBE)
+ {
+ float t = _Custom31_XY_Tube_t;
+ objPos = plane_to_tube(objPos.xzy, t);
+ objPos = objPos.xzy;
+ }
+#endif // _CUSTOM31_XY_TUBE
}
void deform_normal(float3 objPos, inout float3 objNorm, inout float3 objTan) {
-#if defined(_CUSTOM31_TUBES)
- float t = _Custom31_Tubes_t;
- plane_to_tube_normal(objPos, objNorm, objTan, t);
-#endif // _CUSTOM31_TUBES
+#if defined(_CUSTOM31_XZ_TUBE)
+ {
+ float t = _Custom31_XZ_Tube_t;
+ plane_to_tube_normal(objPos, objNorm, objTan, t);
+ }
+#endif // _CUSTOM31_XZ_TUBE
+#if defined(_CUSTOM31_YZ_TUBE)
+ {
+ float t = _Custom31_YZ_Tube_t;
+ plane_to_tube_normal(objPos.yxz, objNorm.yxz, objTan.yxz, t);
+ }
+#endif // _CUSTOM31_YZ_TUBE
+#if defined(_CUSTOM31_XY_TUBE)
+ {
+ float t = _Custom31_XY_Tube_t;
+ plane_to_tube_normal(objPos.xzy, objNorm.xzy, objTan.xzy, t);
+ }
+#endif // _CUSTOM31_XY_TUBE
}
void propagateObjPos(inout v2f i) {