HSV for sprites, hue shift sprite color, change sprite saturation / value


#1

Here’s a stand alone HSV material example. You modify the xyz values of the sprite constant to change the HSV modifier.

https://www.kirupa.com/design/little_about_color_hsv_rgb.htm

HSV_sprite.zip (18.5 KB)

I remember reading about this… that setting custom values is better to do via vertex constants vs fragment constants, and then pass the value from the vp to the fp. Anyone know about that?


#2

Uniforms / constants are global between shader stages in OpenGL, so the same variable and variable value will be available in both even if you set it in either column.