Files
filament/shaders
Mathias Agopian 2f36ab71c9 wip: fog for opaques in applied as a post-process effect (#9645)
Instead of computing the fog "inline", in the forward pass, we can
instead compute it as post-process pass that is applied with a
simple fullscreen quad blending.  On tilers, the operation entirely
stays in the tile, on desktop GPU it is a blending operation.

This works only for opaque materials.

The benefit is that fog will become immune to overdraw, and the forward
pass shader will be simplified, hopefully leading to less register
pressure. Overall performance should be improved.

Another benefit is that it will allow us to free the "fog" texture
slot from all opaque materials.

Transparent materials are unchanged.

This feature is currently DISABLED, and still work in progress; but it
should be mostly functional.

To test it:

```
env material.enable_fog_as_postprocess=true ./out/samples/gltf_viewer
```

This change refactor the fog code, but shouldn't have any impact on the
current behavior.
2026-01-30 12:57:25 -08:00
..