tornavis/source
Clément Foucault 2cf64b9100 EEVEE-Next: Add tile deferred lighting
This adds a tile classification pass to the gbuffer.
This is then compact into streams of tiles for each
complexity level of lighting evaluation.

The benefit over a simpler approach of using a per
object stencil value is that we can have a per
tile granularity of the lighting complexity.

To avoid quad overshading, we use a prepass that
tags different stencil values for each complexity
level. This allows to still use a fullscreen quad
for the light evaluation pass and remove the
diagonal overshading cost.

This doesn't use compute shader at all to leverage
render pass merging and in-tile memory loads.

Using `atomicOr` for adding together the `eClosureBits`
revealed to be too slow. Using multiple non-atomic
writes to many data values is faster and not much
memory hungry.

### Performance
The whole tile scheduling process takes ~70µs for
a half covered 3800x790 framebuffer and doesn't
get much more slower than this.

Using simpler lighting shader helps reduce the cost
of the lighting pass by half in most common cases.
SSS materials stay the most costly.

Pull Request: https://projects.blender.org/blender/blender/pulls/115820
2023-12-07 17:04:51 +01:00
..
blender EEVEE-Next: Add tile deferred lighting 2023-12-07 17:04:51 +01:00
creator Cleanup: clarify #ifndef checks in trailing #endif comments 2023-12-07 10:38:54 +11:00
CMakeLists.txt