ReadonlynameHuman-readable identifier used in graph node labels and error messages.
True when this pass was built with the EVSM2 shadow variant (vs PCSS). Lets a host detect a variant mismatch and rebuild when toggling shadow filters.
StaticcreateOptionaluseSphericalHarmonics?: booleanwhen true, the diffuse IBL term is read
from order-3 SH coefficients (IblTextures.shBuffer) instead of the
irradiance cube (the IBL_DIFFUSE_SH shader variant). Default false — the
pass behaves exactly as before. Specular IBL is unaffected either way.
OptionalshadowFilter?: "pcss" | "vsm"Set the atmosphere parameters used by the aerial-perspective fog applied to
distant geometry. Pass the SAME params the sky uses (e.g. from
AtmospherePass/AtmosphereFeature) so the haze tracks the sky dome.
Takes effect on the next updateLight (the block is re-uploaded with
the rest of the light uniform). Defaults to Earth values when never called.
Put the aerial-perspective fog into curved-horizon (planet) mode. Pass the
world-space position of the planet center — altitudes and the local "up" the
fog uses are then measured radially from it, instead of along world +Y — so
the haze stays consistent with the sky dome on a curved-horizon /
floating-origin globe. In this mode fogHeight (see AerialAtmosphereParams) is interpreted as an altitude above the surface
rather than a world-Y. Pass null to revert to the legacy flat-world path
(the default). Update the center each frame if the origin re-anchors. Takes
effect on the next updateLight.
Enable / configure screen-space contact shadows for the sun. A short
toward-sun ray-march in the lighting shader catches the fine contact
occlusion the cascade maps are too coarse to resolve (an object meeting the
floor, grass on terrain). Pass null (or steps: 0) to disable — the
default, in which case the march is skipped and the look is unchanged. Takes
effect on the next updateLight.
Set the directional light cookie (gobo) — a texture projected along the sun
that patterns its direct light (window blinds, leaf shade, drifting clouds).
Pass null (or { texture: null }) to disable (the default). The cookie's
projection axes are derived from the sun direction each frame; scale is the
world size of one tile and offset scrolls it. Takes effect on the next
updateLight.
EVSM2 sampling params (only meaningful when this pass was built with the
shadowFilter: 'vsm' variant). exponent must match what
DirectionalVsmPass baked the moments at; bleed is the light-bleed
reduction and minVariance the acne floor. Takes effect next frame.
Virtualised-clipmap (shadowMode 2) pool atlas params for the page-table indirection: slots per atlas row + atlas dimensions in texels.
Ambient-IBL multiplier (1 = full). Fade below 1 to dim sky ambient, e.g. at night when the baked sky panorama is still lit.
Skip the world-Y horizon fade on both direct and IBL contributions. Set true for scenes where the sun direction isn't aligned with world +Y at "noon" (e.g. a player walking around a sphere whose sun is pinned to the local zenith) — otherwise the lighting falls off as L.y crosses zero, even though the sun is still "up" for the player.
Skip the aerial-perspective (atmospheric Rayleigh/Mie) fog applied to geometry. Set true for scenes with no atmosphere (e.g. space): the fog extinguishes blue over distance and would warm-shift distant geometry (like a planet backdrop) to red/brown.
OptionalsunDirection: { x: number; y: number; z: number }Toward-sun unit vector for aerial perspective. Defaults to -dir,
which is correct when the directional light IS the sun. Hosts that
swap the key light to a moon at night should pass the real sun's
toward direction here so the atmospheric scattering doesn't follow
the moon.
G-buffer channel visualization (0 = off / normal lighting). See the
debugMode switch in deferred_lighting.wgsl for the channel mapping.
Perceptual-roughness floor (Filament MIN_PERCEPTUAL_ROUGHNESS, ~0.045)
applied in the lighting pass to suppress specular aliasing on smooth
surfaces. Clamped to ≥0.04 in-shader for numerical safety.
Apply screen-space AO per-lobe — multi-bounce GTAO (Jimenez) on the
diffuse indirect term + Lagarde specular occlusion on the specular term.
false reverts to the legacy flat * ao on both (the A/B comparison the
ssao_test sample exposes). Default true.
Directional shadow mode: 0 = cascade (select by view-space depth split), 1 = clipmap / virtual-shadow-map (select by which level's box contains the receiver). Must match the cascades produced by the shadow feature.
Insert the pass into graph for one frame. Implementations call
graph.addPass(name, type, b => { ... }) exactly once and use the
supplied PassBuilder to declare reads, writes, transient
resources, and the execute callback.
Graph being built this frame.
Pass-specific dependency record (handles, scene data, etc.).
Pass-specific output record (typically a set of handles downstream passes will consume).
Release every long-lived GPU resource owned by the pass (pipelines, persistent uniform buffers, samplers, BGLs). Called by the factory or application during teardown. Default implementation is a no-op.
Deferred lighting pass (render-graph version).
Samples the G-Buffer, cascade shadow maps, AO/SSGI and IBL textures, then composites direct + indirect lighting into an HDR target. The camera and light uniform buffers are persistent in the graph cache so downstream passes (composite, godray) can read them via handles.