Tristan Marrec

Computer Graphics Programmer
Home
LinkedIn
Email contact@tmarrec.dev Updated

Tile-Based Light Culling -

While trying to find a job in the computer graphics industry, during a preliminary interview I was asked a question about tile-based light culling, which I knew nothing about. So I decided to look into the matter and implemented it in my own engine.

The basic idea is to start the rendering pipeline with a compute shader that determines which lights cover which areas of the screen space, divided into a 2D grid. Then, during the shading phase, only those lights likely to cover the current pixel are taken into account. This makes it possible to have much more light in a scene than with conventional rendering.

Code available on GitHub or download ZIP.

Here’s the result I obtained after a few hours of prototyping. This scene would not be at an acceptable framerate without this method.

Tiles occupancy visualization

The bluer the screen space tile, the more lights it contains. Interestingly, the edges of the geometries are very blue, as they contain a large spatial zone that contains all the lights between the near and far depths of the tile.

References

  1. Forward vs Deferred vs Forward+ Rendering with DirectX 11 - Jeremiah. 3dgep.com/forward-plus

  2. Optimizing tile-based light culling - Wicked Engine. wickedengine.net/2018/01/optimizing-tile-based-light-culling