diff options
| author | yum <yum.food.vr@gmail.com> | 2025-03-29 21:15:57 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-03-29 21:15:57 -0700 |
| commit | 3f1915bbd0e6176e625c484cf24a460cc88bfeac (patch) | |
| tree | d71f97e21e430ce61e1b748ec30ba7cfb3b7d1d1 /2ner.cginc | |
| parent | 6579d30f558908c23889f9e691a5932a49ecdedd (diff) | |
Add basic audiolink to vertex domain warping
Diffstat (limited to '2ner.cginc')
| -rw-r--r-- | 2ner.cginc | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -17,6 +17,7 @@ #include "shatter_wave.cginc"
#include "ssfd.cginc"
#include "tessellation.cginc"
+#include "vertex_domain_warping.cginc"
#include "yum_brdf.cginc"
#include "yum_pbr.cginc"
#include "yum_lighting.cginc"
@@ -80,15 +81,7 @@ v2f vert(appdata v) { #endif
#if defined(_VERTEX_DOMAIN_WARPING)
- float3 basePos = v.vertex.xyz;
- float t = _Time[0] * _Vertex_Domain_Warping_Speed;
- for (uint i = 0; i < _Vertex_Domain_Warping_Octaves; i++) {
- float3 uv = basePos * _Vertex_Domain_Warping_Scale +
- _Time[0] * _Vertex_Domain_Warping_Speed;
- float3 noise = _Vertex_Domain_Warping_Noise.SampleLevel(trilinear_repeat_s, uv, 0);
- basePos += (noise * 2 - 1) * _Vertex_Domain_Warping_Strength;
- }
- v.vertex.xyz = basePos;
+ v.vertex.xyz = domainWarpVertexPosition(v.vertex.xyz);
#endif
#if defined(OUTLINE_PASS)
|
