Skip to main content

Module lighting

Module lighting 

Source
Expand description

Physically-based and stylized cinematic lighting evaluation. Physically-based and stylized cinematic lighting evaluation.

Modules§

environment_lighting
Portable bounded environment-probe evaluation and fallback policy.

Structs§

DirectionalLight
Directional light source (sun/moon) defined in lux (lm/m^2).
EnvironmentLightingGpu
Portable bounded environment-probe evaluation and fallback policy. Bounded, texture-independent environment lighting binding for a material.
EnvironmentLightingResult
Portable bounded environment-probe evaluation and fallback policy. Result of one environment evaluation.
EnvironmentProbe
Portable bounded environment-probe evaluation and fallback policy. A caller-owned, prefiltered environment probe.
EnvironmentProbeGpu
Portable bounded environment-probe evaluation and fallback policy. One fixed-layout probe record consumed by the viewport material shader.
EnvironmentProbeSet
Portable bounded environment-probe evaluation and fallback policy. Fixed-capacity probe storage. Construction is cold; evaluation is a bounded read-only path.
PointLight
Point light source defined in luminous flux (lumens).
SpotLight
Spot light source with smooth inner/outer angular falloff.
StylizedLightingParams
Authored stylized art direction parameters sharing standard PBR geometry and materials.
SurfaceParameters
Surface parameters for evaluation.

Constants§

ENVIRONMENT_LIGHTING_GPU_SIZE
Portable bounded environment-probe evaluation and fallback policy. Fixed GPU contract size for one material’s environment lighting binding.
ENVIRONMENT_SPECULAR_LEVELS
Portable bounded environment-probe evaluation and fallback policy. Number of roughness-filtered specular levels stored per probe.
MAX_ENVIRONMENT_PROBES
Portable bounded environment-probe evaluation and fallback policy. Maximum number of probes visited by one environment-lighting evaluation.
MAX_LOCAL_LIGHTS
Maximum number of local (point/spot) lights evaluated per fragment/cluster.
PCF_3X3_OFFSETS
Percentage-Closer Filtering (3x3 kernel) oracle weights for shadow maps.

Functions§

apply_normal_offset_bias
Normal-offset bias world position to prevent shadow acne and self-shadowing.
distance_attenuation
Smooth windowed inverse-square distance attenuation.
distribution_ggx
Trowbridge-Reitz GGX Normal Distribution Function.
dot3
Default::dot3.
evaluate_environment_lighting
Portable bounded environment-probe evaluation and fallback policy. Evaluate bounded irradiance/specular probe lighting with an explicit direct-light fallback.
evaluate_fragment_radiance
Evaluate physical or stylized fragment radiance in linear color space.
evaluate_rim_lighting
Evaluate Fresnel rim / silhouette contour lighting.
evaluate_stylized_diffuse
Evaluate stylized quantized diffuse factor from N.L.
fresnel_schlick
Schlick approximation for Fresnel reflection.
normalize3
Default::normalize3.
pcf_kernel_weight_sum
Sum of PCF kernel weights.
spot_angular_attenuation
Smooth angular falloff for spot lights between inner and outer cone cosines.
visibility_smith_ggx
Smith Joint GGX Visibility function (Heitz 2014).