Class ShadowMapper
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Culls and sizes lights and packs their shadow faces into the atlas each frame.
public class ShadowMapperInheritance
object ← ShadowMapper
Properties
BinnedLights
Gets the lights binned by the last ShadowMapper.Bin(List<SceneLight>, Camera, int, Dictionary<string, int>, int) call, nearest first.
public ReadOnlySpan<BinnedLight> BinnedLights { get; }Property Value
ShadowCasters
Gets the shadow faces queued for rendering into the atlas by the last ShadowMapper.Bin(List<SceneLight>, Camera, int, Dictionary<string, int>, int) call.
public List<BinnedShadowCaster> ShadowCasters { get; }Property Value
Methods
Bin(List<SceneLight>, Camera, int, Dictionary<string, int>, int)
Culls the given lights against the camera and allocates shadow atlas regions for the visible casters.
public void Bin(List<SceneLight> lights, Camera camera, int atlasSize, Dictionary<string, int> cookiePaths, int visibilitySequence)Parameters
lights List<SceneLight>
The dynamic lights considered for binning.
camera Camera
The camera used for culling and shadow resolution selection.
atlasSize int
Pixel size of the shadow atlas texture.
cookiePaths Dictionary<string, int>
Map from cookie material path to cookie atlas index, used when recomputing dirty faces.
visibilitySequence int
Sequence number of the readback that the per face cull mask is taken from. A light whose GPU visibility sequence differs counts as visible, so a sequence no light carries keeps every face shadowed.
GetFacePlacement(int)
Gets the atlas placement for an absolute face index (BinnedLight.FirstFaceIndex plus face index).
public ShadowFacePlacement GetFacePlacement(int index)Parameters
index int

