Copy link to clipboard
Copied
Hi
I need some help with limiting the saturation of a color node between 0 and 0.8. I know I should use the linear interpolation function, but when I try breaking the color node with swizzle and limiting the 'y' parameter, it doesn't work. Can you show me the solution? Thanks!
Copy link to clipboard
Copied
The function needs to output RGBA
So this will do it directly as a function within the uniform color node:
Alternatively, if you want to do this on an image in a separate node then use the pixel processor
Both of these examples just clip the saturation. You could quickly adapt either to interpolate rather than clip.
I hope that helps
Dave
Copy link to clipboard
Copied
Thank you.
In the first method, I have to define 3 parameters but I'm looking for a way to define the color parameter (float4) in a way that just the saturation maximum is limited to 0.8
Copy link to clipboard
Copied
In my example only the saturation is limited, the hue and value are free to be any value you input.
The HSV controls have to be either on the normal control panel or from a function acting on inputs which can be exposed in your graph if you wish. You cannot mix them though.
Dave