Class SceneEnvMap
Namespace: ValveResourceFormat.Renderer.SceneEnvironment
Assembly: Renderer.dll
Environment map reflection probe with box or sphere projection.
public class SceneEnvMap : SceneNodeInheritance
object ← SceneNode ← SceneEnvMap
Inherited Members
SceneNode.Transform, SceneNode.LayerName, SceneNode.LayerEnabled, SceneNode.Visible, SceneNode.BoundingBox, SceneNode.LocalBoundingBox, SceneNode.Name, SceneNode.Id, SceneNode.IsSelected, SceneNode.Flags, SceneNode.RenderPasses, SceneNode.UpdateBuffers(Camera), SceneNode.Scene, SceneNode.Parent, SceneNode.EnvMaps, SceneNode.ShaderEnvMapVisibility, SceneNode.LightingOrigin, SceneNode.OverlayRenderOrder, SceneNode.CubeMapPrecomputedHandshake, SceneNode.LightProbeVolumePrecomputedHandshake, SceneNode.LightProbeBinding, SceneNode.EntityData, SceneNode.EntityInstance, SceneNode.Update(Scene.UpdateContext), SceneNode.Simulation, SceneNode.Render(Scene.RenderContext), SceneNode.GetSupportedRenderModes(), SceneNode.SetRenderMode(string), SceneNode.Delete(), SceneNode.GetCameraDistance(Camera)
Constructors
SceneEnvMap(Scene, AABB)
Initializes a new instance of the class with the given local-space bounds.
public SceneEnvMap(Scene scene, AABB bounds)Parameters
scene Scene
The scene this node belongs to.
bounds AABB
The local-space bounds of the env map volume.
Fields
BoundsExtend
Skin added to the probe's box on every side. The shader tests fragments against the grown box, so anything deciding where the probe reaches must grow it by the same amount.
public const float BoundsExtend = 0.02Field Value
NoNormalization
Stands in for a probe whose coefficients could not be read. This evaluates to zero rather than to one: the harmonic holds a radiance, so no value in it means "leave reflections alone", and the shader skips the division when it comes out non positive instead.
public static readonly Vector4 NoNormalizationField Value
Properties
ArrayIndex
If is an array, this is the depth index.
public int ArrayIndex { get; init; }Property Value
EdgeFadeDists
Gets the per-axis edge fade distances used for box projection blending.
public Vector3 EdgeFadeDists { get; init; }Property Value
EnvMapTexture
Gets the cubemap or cubemap-array texture for this environment map.
public required RenderTexture EnvMapTexture { get; init; }Property Value
HandShake
Gets the handshake value used to match this env map to scene nodes during precomputation.
public int HandShake { get; init; }Property Value
IndoorOutdoorLevel
If multiple volumes contain an object, the highest priority volume takes precedence.
public int IndoorOutdoorLevel { get; init; }Property Value
NormalizationSH
Luminance of this probe's own baked radiance, as an L1 spherical harmonic packed for a dot with (normal, 1). It covers the whole probe volume unoccluded, so dividing the per fragment irradiance by it gives specular occlusion.
public Vector4 NormalizationSH { get; init; }Property Value
ProjectionMode
0 = Sphere, 1 = Box
public int ProjectionMode { get; init; }Property Value
ShaderIndex
Gets or sets the shader-side index assigned to this env map for UBO packing.
public int ShaderIndex { get; set; }Property Value
Tint
Gets the color tint applied to reflections from this env map.
public Vector3 Tint { get; init; }Property Value
Methods
CalculateNormalizationSH(float[]?, int)
Reduces one probe's baked radiance to the harmonic holds. The texture stores L2 in RGB, planar, 27 floats per probe; only the constant and linear bands survive, weighted to luminance and folded together with the basis and cosine lobe constants so the shader can evaluate it as a plain dot with (normal, 1).
public static Vector4 CalculateNormalizationSH(float[]? radianceCoefficients, int arrayIndex)Parameters
radianceCoefficients float[]?
Coefficients for every probe in the array, or null.
arrayIndex int
Index of this probe within the array.

