Easy way to achieve lighting

Hi there,

I’m looking for the easiest way to achieve this style of lighting: http://fervir.itch.io/elysis

I would figure that the best method would be simply having a transparent image that fades to black, similar to that of the example… but I may be wrong.

Thanks!

  • A

You basically described it , change the alpha per level and bam you got it.

So, you can use an image,gradient from transparent to black? Okay, but how could I make it so that the rest of the screen was black? As if there was a dark layer, then the transparent layer allowed you to see through it, which the world would be under it…

Thanks!

Just draw the vignette image over your scene? Transparent in the middle, getting more and more tinted towards the edges.

Or do the same thing implicitly with shaders: https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson3

Okay, for the vignette, how would I make it so that I wouldn’t have just a huge dark image with the transparent in the middle? Basically I need something like this:
1.) Black layer on top
2.) Vignette, allowing see through first layer on transparency…
3.) Bottom layer… game.

Thanks!

Step 1. render scene normally.
Step 2. Draw this over top:

Posterize/etc the image if you want the stepped look.