Brightness settings?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Taycamgame
Prole
Posts: 4
Joined: Sun Jun 14, 2020 5:54 pm

Brightness settings?

Post 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!
User avatar
pgimeno
Party member
Posts: 3593
Joined: Sun Oct 18, 2015 2:58 pm

Re: Brightness settings?

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests