Skip to content

Tiled Lighting (Forward Plus)

Vladislav Kantaev edited this page Nov 29, 2023 · 9 revisions

Motivation

Because traditional rendering of additional lights in a forward renderer is quite expensive, the number of per-object lights is limited to 4.

To bypass that limitation and achieve highly performant rendering of scenes with hundreds of lights in view, Toon RP supports Tiled Lighting (i.e., Forward+). In a nutshell, it splits the screen into small tiles (16x16 pixels in case of Toon RP) and find the lights potentially influencing each tile.

This is done in compute shaders, therefore your target platforms must support them (see the official documentation page) to verify support.

Tiled Lighting

Setup

To enable Tiled Lighting in Toon RP:

  • In the pipeline asset's Camera Renderer settings, ensure you have Additional Lights set to Per Pixel;
  • Enable Tiled Lighting.

📝 Note: Tiled Lighting requires Depth Pre-Pass.

You can also configure the maximum number of lights that can be assigned to a tile: Max Lights Per Tile. Keep the number as low as possible to improve performance and video memory usage. However, reaching the limit in-game will introduce noticeable blocky artifacts.

Tiled Lighting

Known Issues

References