From 274f601c9c49f69e4acef24b56982190b5b0bf93 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 25 Mar 2025 19:12:49 -0700 Subject: Continue work on tessellation --- shatter_wave.cginc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shatter_wave.cginc') 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 -- cgit v1.2.3