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:
authorRamil Roosileht <Limarest>2022-05-10 05:46:22 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-05-10 05:46:22 +0300
commit4bb90b8f4c39388837bd78419d799923690c88c9 (patch)
tree0c8dab9ee6c7ad3b9529faf7adafacfa03aa97bd /source/blender/editors/sculpt_paint/sculpt_filter_color.c
parent1c1e8428791fe376ec67ff96b15b5deae8f18296 (diff)
D14887: Fix artifacts in hue filter
The hue color filter now wraps correctly. Fixes T97768. Reviewed By: Julien Kaspar & Joseph Eagar Differential Revision: https://developer.blender.org/D14887 Ref D14887
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_filter_color.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_filter_color.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c
index c0db587f69a..9bddc2ad855 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c
@@ -124,8 +124,8 @@ static void color_filter_task_cb(void *__restrict userdata,
}
case COLOR_FILTER_HUE:
rgb_to_hsv_v(orig_color, hsv_color);
- hue = hsv_color[0] + fade;
- hsv_color[0] = fabs((hsv_color[0] + fade) - hue);
+ hue = hsv_color[0];
+ hsv_color[0] = fmod((hsv_color[0] + fabs(fade)) - hue,1);
hsv_to_rgb_v(hsv_color, final_color);
break;
case COLOR_FILTER_SATURATION: