Class LightProbeAtlasPacker
Namespace: ValveResourceFormat.Renderer.Utils
Assembly: Renderer.dll
Packs light probe volume grids into a single 3D atlas. All sizes are in probes, matching the direct light textures. The irradiance texture is six times deeper (one slice per ambient cube face), which the caller accounts for.
public static class LightProbeAtlasPackerInheritance
object ← LightProbeAtlasPacker
Remarks
Slots are aligned to 4 in X and Y so block compressed textures can be copied block by block. No padding is needed between slots because the shader clamps lookups half a probe inside each volume.
Fields
BlockSize
Slot alignment in X and Y, the size of a compressed block.
public const int BlockSize = 4Field Value
int
Methods
Pack(IReadOnlyList<(int Width, int Height, int Depth)>, int, int, out (int Width, int Height, int Depth))
Packs grids into an atlas within the given size limits.
public static LightProbeAtlasSlot?[] Pack(IReadOnlyList<(int Width, int Height, int Depth)> sizes, int maxSide, int maxDepth, out (int Width, int Height, int Depth) atlasSize)Parameters
sizes IReadOnlyList<(int Width, int Height, int Depth)>
Grid sizes, in probes.
maxSide int
Maximum atlas width and height.
maxDepth int
Maximum atlas depth.
atlasSize (int Width, int Height, int Depth)
Resulting atlas size, in probes.
Returns
Slot per grid in the same order as sizes, null where a grid did not fit.

