mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-07 02:07:32 +08:00
clamp saturation in colorize instead of wrapping
This commit is contained in:
parent
a2f6ae4fae
commit
30f1baa9a6
@ -169,7 +169,7 @@ vec3 colorize(vec3 rgb, float hue, float sat, float light) {
|
|||||||
float lum = dot(rgb, vec3(0.299, 0.587, 0.114));
|
float lum = dot(rgb, vec3(0.299, 0.587, 0.114));
|
||||||
float l = adjustLightness(lum, light);
|
float l = adjustLightness(lum, light);
|
||||||
|
|
||||||
vec3 hsl = vec3(fract(hue), clamp(abs(sat), 0.0, 1.0), clamp(l, 0.0, 1.0));
|
vec3 hsl = vec3(fract(hue), clamp(sat, 0.0, 1.0), clamp(l, 0.0, 1.0));
|
||||||
return hsl2rgb(hsl);
|
return hsl2rgb(hsl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user