The old system is still in place and is executing, alongside the new system.
Rendering will use the results of the new system, though.
Shadowmap rendering now happens after light lists have been generated.
All relevant files are in the Shadow subfolder.
The basic file structure is:
- ShadowBase.cs has interface and base class definitions
- Shadow.cs has default implementations
- Shadow.hlsl is the default header to be included by shaders
TilePass.cs currently owns the shadows via its InitShadowSystem function.
Added a factor of 100 to the normal bias passed into the shader.
Updated shaders to use the new zw component for the normal bias offset.
Added bias offset code to point, spot and punctual routines as well.
Added support for the new shadow library to fptl.
Introduced a new shadow include inline file to support different shadow setups for different light loops per project.
Restructured the code a bit in order to support multiple instances per project.
Fixed and issue with broken shaders when one of the samplers was set to 0.
- Instead of wasting one value in materialId (only 4 availabe, we reuse
the matid standard and the value in the specular), it allow to have 2
matId free.
- Optimize the code with shader features for materialID
Added:
- normal+view biasing
- light view only biasing
- per sample biasing for wide PCF filters
- corner light leaking mitigation
- defines to control what type of biasing should be enabled
- a few new UI controls in the additionalshadowdata component
Removed previous biasing controls. They won't have any effect anymore.
Replaced shadow specific cubemap face function. The shadow system is now going to use the one from common.hlsl.
Renamed nrml to normal.
Added a few comments.