Page 1 of 1

Brightness settings?

Posted: Thu Jul 09, 2020 7:05 pm
by Taycamgame
How do you add a setting into a game which affects the brightness of everything in the game screen? And does it require the usage of shaders? Thanks!

Re: Brightness settings?

Posted: Thu Jul 09, 2020 10:06 pm
by pgimeno
There are some ways to do this. A shader is one way, certainly, and if you're not otherwise using shaders in your application, it may be the simplest because it will be quite transparent to your code. Another way is to render everything to a canvas and then draw the canvas to the screen with a grey colour of the required intensity. Depending on what you're drawing, you could maybe do it without a canvas, just changing the colour of everything you draw to scale the colour components by the brightness.