blog games developers documentation portfolio gallery



void Saturation(float deltaSaturation)

Will convert all pixels from RGB to their HSB values, change the S (Saturation) and convert them back to RGB.

deltaSaturation can be any value between -1.0 and +1.0. When deltaSaturation = 0.0, nothing is changed. A deltaSaturation of 0.0 will result in a monochrome image (B/W picture)


if(GUI.Button(new Rect(0,0,200,25), "Reduce color")) {
myTexture.Saturation(-0.8f); // remove most of the color

follow us