diff options
| author | yum <yum.food.vr@gmail.com> | 2025-03-25 19:12:49 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-03-25 19:12:49 -0700 |
| commit | 274f601c9c49f69e4acef24b56982190b5b0bf93 (patch) | |
| tree | 8c241e6cb0310485edb7db96d42d164189753c4b /shatter_wave.cginc | |
| parent | ccdda956f7de812bb9c318161c6852301a60d413 (diff) | |
Continue work on tessellation
Diffstat (limited to 'shatter_wave.cginc')
| -rw-r--r-- | shatter_wave.cginc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/shatter_wave.cginc b/shatter_wave.cginc index 72f8097..87a21cc 100644 --- a/shatter_wave.cginc +++ b/shatter_wave.cginc @@ -23,6 +23,12 @@ void shatterWaveVert(inout float3 objPos, float3 objNormal, float3 objTangent) { float3 objPos_proj = dot(objPos, wave_axis) * normalize(wave_axis);
float offset = exp(-length(objPos_proj - wave_center * wave_axis) * _Shatter_Wave_Power) * _Shatter_Wave_Amplitude;
objPos += objNormal * offset;
+
+ float phase = (wave_t / _Shatter_Wave_Period) + 0.5;
+}
+
+void shatterWaveFrag(inout float3 normal, float3 objPos) {
+ normal = normalize(cross(ddy(objPos), ddx(objPos)));
}
#endif // _SHATTER_WAVE
|
