Class ShadowAtlasPacker
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Allocates shadow map regions from an atlas using a bitmask occupancy grid of -pixel cells.
csharp
public class ShadowAtlasPackerInheritance
Fields
CellSize
Size in pixels of one occupancy grid cell.
csharp
public const int CellSize = 64Field Value
Methods
Begin(int)
Resets the atlas to empty for a new allocation pass.
csharp
public void Begin(int atlasSize)Parameters
atlasSize int
Width and height of the square atlas texture in texels.
TryAllocate(int, int, out ShadowAtlasRegion)
Attempts to allocate a cell-aligned region of the given pixel dimensions.
csharp
public bool TryAllocate(int width, int height, out ShadowAtlasRegion region)Parameters
width int
Requested region width in texels.
height int
Requested region height in texels.
region ShadowAtlasRegion
The allocated region, or a zero region on failure.
Returns
True if the region was allocated.

