Files
test/source
Clément Foucault ecc495ac39 EEVEE: Optimize Principled BSDF compilation time
This removes unused closure branches in the principled BSDF
code using the Material flags.

On top of this, use constants for weights to use compiler
dead code eliminitation for unused branches when there
is different variants of the principled BSDF node used.

Finally, remove Gbuffer packing cases that are not present
inside the nodetree.

Testing with the same setup as #145347:
|          | main (ms) |  PR (ms) |   Delta (ms) |
| -------- | ----------- | ------------ |------------ |
| Nvidia   |         174 |  132 (1.31x) |          42 |
| Mesa AMD |         191 |  170 (1.12x) |         21 |

Barbershop compilation time is almost equal because it is not using
the principled BSDF.

Rel #145347

Pull Request: https://projects.blender.org/blender/blender/pulls/146324
2025-09-16 16:44:01 +02:00
..