diff options
| author | yum <yum.food.vr@gmail.com> | 2025-10-11 22:08:17 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-10-12 11:14:39 -0700 |
| commit | b056c6935128dd7e4a9572a946bab5c4bc08da32 (patch) | |
| tree | 1de16ab073383a5277a19354fbf0d63feaa5090f /vertex.cginc | |
| parent | dc8a6dfb9d78316b8c58c587bc606468377b0fe3 (diff) | |
gay behavior
Diffstat (limited to 'vertex.cginc')
| -rw-r--r-- | vertex.cginc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vertex.cginc b/vertex.cginc new file mode 100644 index 0000000..0140ff2 --- /dev/null +++ b/vertex.cginc @@ -0,0 +1,31 @@ +#ifndef __VERTEX_INC +#define __VERTEX_INC + +#include "custom31.hlsl" + +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); +#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); +#endif // _CUSTOM31_TUBES +} + +void propagateObjPos(inout v2f i) { + i.worldPos = mul(unity_ObjectToWorld, float4(i.objPos, 1)); + i.pos = UnityObjectToClipPos(i.objPos); + i.eyeVec.xyz = i.worldPos - _WorldSpaceCameraPos; +} + +#endif // __VERTEX_INC + |
