From 07b1aca3f096a520cbae1d4cca18692fc69d2944 Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 26 Oct 2024 15:51:30 -0700 Subject: Update cloning Optimize cloning logic, and make each clone rotate independently of the others when the explosion effect is active. --- gerstner.cginc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gerstner.cginc') diff --git a/gerstner.cginc b/gerstner.cginc index 47843a7..a5f7db2 100644 --- a/gerstner.cginc +++ b/gerstner.cginc @@ -148,9 +148,9 @@ GerstnerInternalResult compute_gerstner(float3 pp, GerstnerParams p) float3 result_obj = mul(unity_WorldToObject, float4(result_world, 1)).xyz; result_obj = lerp(result_obj, raw_result, - // If within 3m cylindrical distance, apply 100m wide damping. + // If within cylindrical distance, apply damping. // TODO parameterize this! - dsaturate((length(raw_result_world.xz) - 20), 1) * + dsaturate((length(raw_result_world.xz) - 15), 1) * // Only enable if mesh is on the wrong side of the damping vector. // TODO make this differentiable. As is, there's a visible seam. dsaturate(-(raw_result_world.y - _Gimmick_Gerstner_Water_Origin_Damping_Direction) * sign(_Gimmick_Gerstner_Water_Origin_Damping_Direction), 1)); -- cgit v1.2.3