Api Sandbox IndirectLightVolume
class

IndirectLightVolume

public sealed class IndirectLightVolume : Component

Dynamic Diffuse Global Illumination volume that provides indirect lighting using a 3D probe grid. Probes store irradiance and distance data in volume textures that can be sampled by shaders.

Constructors

IndirectLightVolume()

Properties

Name Type Description
Bounds BBox World-space bounding box that defines the volume coverage area.
ProbeDensity Int32 Number of probes per 1024 world units. Higher values increase probe resolution.
NormalBias Single Bias applied along surface normals to prevent self-occlusion artifacts.
Contrast Single Controls how much less energy to conserve during probe integration. Higher values give a harsher, more contrasty look.
ProbeCounts Vector3Int Calculated probe count along each axis based on bounds and density.
IrradianceTexture Texture Volume texture storing probe irradiance data (color).
DistanceTexture Texture Volume texture storing probe distance/visibility data.
RelocationTexture Texture Volume texture storing probe relocation offsets (XYZ = offset, W = active).
InsideGeometry InsideGeometryBehavior How to handle probes detected inside geometry.

Methods

Task BakeProbes(CancellationToken ct = null)

Starts the probe baking process to capture lighting into the volume textures.

Void ExtendToSceneBounds()

Automatically sizes the volume to encompass all scene geometry.

static Task BakeAll()
Void ComputeProbeRelocation()

Computes probe relocation offsets for all probes in the volume. Uses iterative refinement with mesh tracing. All computations are relative to probe spacing for resolution-independent behavior.

Void ClearProbeRelocation()

Clears all probe relocation offsets.

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.IndirectLightVolume