This moves the thickness from shadow map
approximation out of the lighting and shadowing
loop. Instead of using the thickness from
the shadow tracing from each individual light
before SSS evaluation, we precompute the
average thickness from all shadowed light.
This is then mixed with the nodetree thicknes.
This has a few benefits:
- Reduces complexity of the shadow and light evaluation (speedup).
- Allows better shadowing: anything after the computed thickness
is considered shadowing instead of trying to compute thickness for
each light.
- Allows unshadowed lights to reuse the thickness computed from
shadowed light.
- The thickness now become a split parameter that can be evaluated
using different method.
- Make thickness effects compatible with forward pipeline and Shader
to RGBA.
This add back SSS transmission support by using the above thickness
computation, and applying the transmission profile on it. This is
then applied on top of a flipped normal LTC computation.