Hue Saturation Value – Giavapps CC

 

Shader Setup

 

Giavapps CC provides the following function for initializing the Giavapps CC Hue Saturation Value Shader:

 

cc_shader_hsv_init() Initializes local variables and retrieves all uniform handles of the Giavapps CC Hue Saturation Value Shader (shader_giavapps_cc_hsv).

 

Then you will just need to set your drawing target with the following function:

 

cc_shader_hsv_set() Sets the drawing target to the Giavapps CC Hue Saturation Value Shader (shader_giavapps_cc_hsv) and all further drawing will be done using that. You can end shader use with function shader_reset().

 

Local Array

 

You can control the following local array:

 

cc_hsv

 

And then access to its values by using the following constants:

 

CC_HSV_MIX Mixes the input color with the output color. (Default Value: 1 – Value: from 0 to 1)

 

CC_HSV_HUE Hue component. (Default Value: 0 – Value: from 0 to 1)

 

CC_HSV_SATURATION Saturation component. (Default Value: 1 – Value: from 0 to 10+)

 

CC_HSV_VALUE Value component. (Default Value: 1 – Value: from 0 to 10+)

 

Code Examples

 

Giavapps CC Hue Saturation Value Shader

 

Create Event

 

cc_shader_hsv_init();//initializes local variables and retrieves all shader uniform handles of the Giavapps CC Hue Saturation Value Shader

 

Step Event

 

cc_hsv[CC_HSV_HUE] = (cc_hsv[CC_HSV_HUE]+0.01) mod 1;//loops the hue value from 0 to 1

 

Draw Event

 

cc_shader_hsv_set();//applies the Giavapps CC Hue Saturation Value Shader
draw_self();//draws the sprite assigned to the instance
shader_reset();//resets the draw target

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

 

Leave a Reply

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

*