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.
Modified ShadowManager to take an array of shadow maps instead of only one. The shadowmanager will allocate lights according to each shadowmap's supported shadows mask. Shadowmaps are traversed in order specified in the constructor. Currently there's a limit of 4 maps per light type.
Changed shadow sampling functions in shader code to support multiple comparison samplers.
Modified tilepass to pass two shadowmaps, one for directional, one for point lights, to the shadowmanager to test the new functionality. This will probably change again soon.
Merged directional and point/spot lights into the same atlas again. Added two additional atlases to support 16 bpp VSM style shadow maps.
Added new dropdown to AdditionalLightData to select precision if available.
Changed the shadow context declaration so no code for cubemaps will be generated, anymore.
Modified the texfetch functions. Instead of returning from the loop the routines only break. This fixes a warning about an uninitialized variable and also leads to fewer instructions generated.
Restructured ShadowDispatch.hlsl a little bit to make changing resources and algorithms a bit easier.