From 29be0f07fee46957c1afd843fd3c1ff478cc052b Mon Sep 17 00:00:00 2001 From: Lee Kerley Date: Wed, 21 Aug 2024 14:45:11 -0700 Subject: [PATCH] Align GLSL/MSL code for smoothstep with OSL (https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/commit/67e886e9e24880f8618c07feeea8102926ad76ec). --- libraries/stdlib/genglsl/mx_smoothstep_float.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/stdlib/genglsl/mx_smoothstep_float.glsl b/libraries/stdlib/genglsl/mx_smoothstep_float.glsl index 1bca2e4d9b..e49f56bd05 100644 --- a/libraries/stdlib/genglsl/mx_smoothstep_float.glsl +++ b/libraries/stdlib/genglsl/mx_smoothstep_float.glsl @@ -1,9 +1,9 @@ void mx_smoothstep_float(float val, float low, float high, out float result) { - if (val <= low) - result = 0.0; - else if (val >= high) + if (val >= high) result = 1.0; + else if (val <= low >) + result = 0.0; else result = smoothstep(low, high, val); }