blog games developers documentation portfolio gallery

Documentation:

Luminance()

void Luminance(float deltaLuminance)



Will increase/decrease the luminance of all pixels (exposure). deltaLuminance can be any value between -1.0 (make entire image black) and +1.0 (make entire image white). A value of 0.0 will result in no change at all.

In essence it does this:
newPixelColor = pixelColor + new Color(deltaLuminance, deltaLuminance, deltaLuminance);


Example:

if(GUI.Button(new Rect(0,0,200,25), "I'd rather go blind")) {
myTexture.Luminance(0.7f); // make image overexposed
}








follow us