Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-14 21:03:59 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-14 21:28:44 +0300
commit9886ae63311da83d962a546bb2c252316ba63538 (patch)
tree7a9f4946fbfad8af41dd8c68bac8d5bcb3c1f9c8 /source/blender/gpu/shaders
parentfb6f1aa12f945c6a17ca96f402dec2f6bce81463 (diff)
Fix T61470: incorrect saturation clamping in recent bugfix.
We should clamp the result after multiplication.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 970bbe641d4..c269185eb0f 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -882,7 +882,7 @@ void hue_sat(float hue, float sat, float value, float fac, vec4 col, out vec4 ou
rgb_to_hsv(col, hsv);
hsv[0] = fract(hsv[0] + hue + 0.5);
- hsv[1] = hsv[1] * clamp(sat, 0.0, 1.0);
+ hsv[1] = clamp(hsv[1] * sat, 0.0, 1.0);
hsv[2] = hsv[2] * value;
hsv_to_rgb(hsv, outcol);