A high performance lighting system for 2D games

Topic will be started with the custom lighting system that allows for a lot 2D light sources even on low spec hardware. It was made in Unity but this approach should work in any game engine that lets you create procedural meshes.

Procedural Meshes to the rescue!
The basic idea is to use a procedural mesh to “stamp” the lighting data into a light buffer that is then sampled in shaders. This is not that different from how deffered lighting works, however this solution only needs to work in 2D so author can get this done in one draw call for all my lights at once by using a procedural mesh to draw the light.

The lasers in the example were rendered with a procedural mesh so it already had a texture lying around which can be used to store the light falloff in.

The laser sheet...