-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
| color.rgb = vec3(mix(color.rgb, gray, m_DesaturationValue)); |
Currently we have this float uniform that allows altering the saturation of Unshaded materials (particularly useful for gui components that get grayed in/out depending on a component's state), however the current implementation using this float is non-ideal in cases where the desaturation is faded in/out smoothly, as it requires re-setting the matParam every frame which causes a drop in frame rate (an unavoidable symptom of floats and similar primitive varTypes for matParams). It would be much better to pack this parameter into a vector for proper usage.
So I'm planning on adding support for a an HSV vec3 uniform (hue/saturation/value) which will fix this shortcoming while also adding some extra useful functionality with the addition of hue and value scaling. I'm also considering adding the HSV support to a .glsllib so it can also be implemented into PBRLighting.frag since HSV color editing in-shader is a great feature to have. Modifying a a color in HSV space is much better and gives much more control than simply using the existing Color uniforms as a multiplier which only typically works if the original color is already desaturated.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status