Modified ShadowmapBase by adding a new enum bitmask designating the supported shadow types by this shadowmap.
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.
namespaceShadowExp// temporary namespace until everything can be merged into the HDPipeline
{
// Specific implementations managing atlases and the likes should inherit from this
abstractpublicclassShadowmapBase
{
[Flags]
publicenumShadowSupport
{
Point=1<<GPUShadowType.Point,
Spot=1<<GPUShadowType.Spot,
Directional=1<<GPUShadowType.Directional
}
publicstructShadowRequest
{
privateconstbytek_IndexBits=24;
protectedreadonlyfloatm_WidthRcp;
protectedreadonlyfloatm_HeightRcp;
protectedreadonlyuintm_MaxPayloadCount;
protectedreadonlyShadowSupportm_ShadowSupport;
protecteduintm_ShadowId;
protectedCullResultsm_CullResults;// TODO: Temporary, due to CullResults dependency in ShadowUtils' matrix extraction code. Remove this member once that dependency is gone.
publicComparisonSamplerStatecomparisonSamplerState;// the desired sampler state for native shadowmaps doing depth comparisons as well
publicVector4clearColor;// the clear color used for non-native shadowmaps
publicuintmaxPayloadCount;// how many ints will be pushed into the payload buffer for each invocation of Reserve
publicShadowSupportshadowSupport;// bitmask of all shadow types that this shadowmap supports
caseLightType.Area:gputype=GPULightType.Rectangle;returnfalse;// area lights by themselves can't be mapped to any GPU type
caseLightType.Area:gputype=GPULightType.Rectangle;shadowtype=GPUShadowType.Unknown;returnfalse;// area lights by themselves can't be mapped to any GPU type