blog games developers documentation portfolio gallery

Documentation:

Contrast()

void Contrast(float deltaContrast)



Will stretch or reduce the contrast of the image. The parameter deltaContrast can be any float value. A value of 0.0 will not change the image at all.
A value of 0 will multiply the contrast by 1.0 (changes nothing)
A value of +1 will multiply the contrast by 2.0.
A value of +2 will multiply the contrast by 3.0.
A value of +3 will multiply the contrast by 4.0.
A value = -1.0 will multiply the contrast by 0.5.
A value = -2.0 will multiply the contrast by 0.33.
A value = -3.0 will multiply the contrast by 0.25.


Example:

if(GUI.Button(new Rect(0,0,200,25), "What was in that cake?")) {
myTexture.Contrast(-0.5f); // reduce contrast a little
}








follow us