Fix T97097: Color filter saturate affects non-colors

Saturation is now tested for > 0.001 instead of != 0.
We may wish to turn the limit into an operator property
in the future.
This commit is contained in:
Joseph Eagar 2022-04-28 23:22:16 -07:00
parent cc8fe1a1cb
commit 65e7219706
Notes: blender-bot 2023-02-14 08:38:11 +01:00
Referenced by issue #97097, Sculpt Painting: Color Filter saturates colors that have no saturation
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ static void color_filter_task_cb(void *__restrict userdata,
case COLOR_FILTER_SATURATION:
rgb_to_hsv_v(orig_color, hsv_color);
if (hsv_color[1] != 0.0f) {
if (hsv_color[1] > 0.001f) {
hsv_color[1] = clamp_f(hsv_color[1] + fade, 0.0f, 1.0f);
hsv_to_rgb_v(hsv_color, final_color);
}