Class ShadowAtlasPacker
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Packs shadow map requests into a single atlas texture using a shelf-based bin-packing algorithm.
csharp
public class ShadowAtlasPackerInheritance
Constructors
ShadowAtlasPacker(int)
Initializes the packer with a fixed capacity.
csharp
public ShadowAtlasPacker(int capacity)Parameters
capacity int
Maximum number of shadow map entries to support.
Properties
MaxShadowMaps
Gets the maximum number of shadow maps this packer can accommodate.
csharp
public int MaxShadowMaps { get; }Property Value
Methods
Pack(int, ReadOnlySpan<ShadowRequest>)
Packs the given shadow map requests into an atlas of the specified size and returns the resulting regions.
csharp
public Span<ShadowAtlasRegion> Pack(int atlasSize, ReadOnlySpan<ShadowRequest> requests)Parameters
atlasSize int
Width and height of the square atlas texture in texels.
requests ReadOnlySpan<ShadowRequest>
Shadow map dimension requests to pack.
Returns
A span of regions in request-index order; regions that did not fit will have zero dimensions.

