Class LightingConstants
Namespace: ValveResourceFormat.Renderer.Buffers
Assembly: Renderer.dll
Uniform buffer containing all scene lights and lightmap configuration.
public class LightingConstantsInheritance
Constructors
LightingConstants()
Initializes a new with all arrays allocated to their maximum sizes.
public LightingConstants()Fields
EnvMapSizeConstants
Mip level and size constants used when sampling environment maps.
public Vector4 EnvMapSizeConstantsField Value
IsSkybox
Non-zero when the current draw is part of the skybox.
public uint IsSkyboxField Value
LightColor_Brightness
Light color per light. V1: premultiplied linear color (RGB) and render-specular flag (W), like g_vBakedLightColor. V2: linear color (RGB) and brightness (W).
public Vector4[] LightColor_BrightnessField Value
Vector4[]
LightDirection_InvRange
World-space direction (XYZ) and inverse range (W) for each light.
public Vector4[] LightDirection_InvRangeField Value
Vector4[]
LightFallOff
Per-light falloff shaped like g_vSingleLightFalloffParams: linear (X) and quadratic (Y) attenuation, squared range cutoff (Z), zero-at-range bias (W).
public Vector4[] LightFallOffField Value
Vector4[]
LightPosition_Type
World-space position (XYZ) and type (W) for each light.
public Vector4[] LightPosition_TypeField Value
Vector4[]
LightSpotInnerOuterCosines
Spot cone cosines or ortho half extents (XY), plus the diffuse and transmissive render gates (ZW), for each light.
public Vector4[] LightSpotInnerOuterCosinesField Value
Vector4[]
LightToWorld
Transform matrix from light space to world space for each light.
public Matrix4x4[] LightToWorldField Value
LightmapUvScale
UV scale applied when sampling the lightmap atlas.
public Vector2 LightmapUvScaleField Value
MAX_LIGHTS
Maximum number of lights (static plus dynamic) supported per scene.
public const int MAX_LIGHTS = 256Field Value
NumBarnLights
Number of active barn lights in the scene.
public uint NumBarnLightsField Value
SunColor
Sun color: linear color premultiplied by brightness (RGB), render-specular flag (W).
public Vector4 SunColorField Value
SunDirection
Surface-to-sun direction (XYZ) of the environment light, or zero when the scene has none.
public Vector4 SunDirectionField Value
SunLightBakedShadowMask
Sun baked shadow data: V2 stores the one-hot shadow channel mask, V1 stores the sun's baked light index 0-255 in X (-1 for none).
public Vector4 SunLightBakedShadowMaskField Value
Properties
DynamicLightCount
Gets or sets the total light count (static plus dynamic); dynamic lights occupy indices from up to this value.
public uint DynamicLightCount { get; set; }Property Value
StaticLightCount
Gets or sets the number of lightmapped lights in the scene.
public uint StaticLightCount { get; set; }
