diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-14 15:52:47 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-14 15:52:47 -0800 |
| commit | 5b2bf2250b64c5cbd2e0643301634dc80badc875 (patch) | |
| tree | 72aa1cbbca3533c07ba20779819b4e7029231136 /vertex_deformation.slang | |
| parent | ad551018904f13b8af0d1c4c2aa8380ac57de89a (diff) | |
Impostors: simplify code
Diffstat (limited to 'vertex_deformation.slang')
| -rw-r--r-- | vertex_deformation.slang | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vertex_deformation.slang b/vertex_deformation.slang index 6e916ed..1cb002f 100644 --- a/vertex_deformation.slang +++ b/vertex_deformation.slang @@ -385,7 +385,7 @@ public void sine_wave_undeform_normal(float3 xyz, inout float3 normal, [Differentiable] public float3 norm_conversion(float3 xyz, no_diff float input_k, no_diff float output_k, no_diff float t) { - float3 xyz_abs = abs(xyz)+1e-3f; + float3 xyz_abs = abs(xyz)+1e-4f; float lin = pow(pow(xyz_abs.x, input_k) + pow(xyz_abs.y, input_k) + pow(xyz_abs.z, input_k), 1.0f / input_k); float lout = pow(pow(xyz_abs.x, output_k) + pow(xyz_abs.y, output_k) + pow(xyz_abs.z, output_k), 1.0f / output_k); float scale = lerp(1.0f, lout / lin, t); |
