diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-14 21:03:59 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-14 21:28:44 +0300 |
commit | 9886ae63311da83d962a546bb2c252316ba63538 (patch) | |
tree | 7a9f4946fbfad8af41dd8c68bac8d5bcb3c1f9c8 /source/blender/nodes/shader | |
parent | fb6f1aa12f945c6a17ca96f402dec2f6bce81463 (diff) |
Fix T61470: incorrect saturation clamping in recent bugfix.
We should clamp the result after multiplication.
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_hueSatVal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c index b52681190b4..33e80ce2ab0 100644 --- a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c +++ b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c @@ -47,7 +47,7 @@ static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float hue, float sat rgb_to_hsv(in[0], in[1], in[2], hsv, hsv + 1, hsv + 2); hsv[0] = fmodf(hsv[0] + hue + 0.5f, 1.0f); - hsv[1] *= clamp_f(sat, 0.0f, 1.0f); + hsv[1] = clamp_f(hsv[1] * sat, 0.0f, 1.0f); hsv[2] *= val; hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col + 1, col + 2); |