Identifies which renderer pass is asking the material for a shader. A single
Material may support multiple pass types and is expected to return WGSL
appropriate for each.
Reflection compositing / debug mode.
Abstract base class for all behaviors attached to a GameObject.
Top-level orchestration object: owns the RenderContext, Scene, the active Camera, the PhysicalResourceCache, the registered RenderFeatures, and the per-frame loop.
Container for transform, children, and components.
Top-level container for the GameObject hierarchy.
A typed, multi-listener event bound to an object property. Being a property rather than a string-keyed event makes the set of events a class emits explicit, removes misspelled-name bugs, and lets TypeScript check listener argument types end-to-end:
GLTF-style joint hierarchy with rest pose and inverse-bind matrices.
Local TRS plus a cached world transform for a GameObject.
View frustum as 6 planes extracted from a view-projection matrix (Gribb–Hartmann), normalized so a plane evaluation yields a true signed distance. Reused in place via setFromViewProj to keep per-frame culling allocation-free.
Column-major 4x4 matrix compatible with WebGPU/WGSL.
Unit quaternion representing a 3D rotation, stored as (x, y, z, w) with w as the scalar part.
Seeded pseudo-random number generator using the Xorwow variant of Marsaglia's xorshift family.
2D vector with mutable x/y components and immutable arithmetic methods.
3D vector with mutable x/y/z components and immutable arithmetic methods.
4D vector with mutable x/y/z/w components and immutable arithmetic methods.
Owns the WebGPU device, queue and canvas configuration for the renderer.
Directional light component representing the sun.
Omnidirectional point light component.
Cone-restricted spot light component.
Spot light parameters uploaded as one element of the spot-light storage buffer.
Screen-space ambient occlusion. Switchable between SSAO, GTAO, and HBAO+ at runtime — all three pass instances are persistent and only the active one is wired into the graph (so toggling invalidates the cached graph).
Procedural atmospheric scattering. Writes (or initializes) frame.hdr.
Reads camera pos + inverse VP + sun direction from the frame's camera + the
scene's first DirectionalLightComponent.
Bakes the atmosphere transmittance + multi-scattering LUTs at startup and publishes the resulting texture handles into Frame.extras each frame. Other features consume the LUTs by reading those keys:
Histogram-based auto-exposure. Samples frame.hdr (read-only) and writes a
persistent exposure buffer that downstream features (e.g.
CompositeFeature) sample. Exposes the buffer handle on
frame.exposureBuffer.
HDR bloom post. Reads frame.hdr, writes the result back into frame.hdr.
Cartesian-grid volumetric clouds. Reads + writes frame.hdr and consumes
frame.depth. Mutate settings in place to drive sliders / animation —
the underlying CloudPass uploads them via update each frame.
Renders a ClusteredMesh into the engine's deferred G-buffer so the
stock lighting / shadows / AO / IBL light it unchanged — the meshlet pipeline
(compute cull → vertex-pulling drawIndirect) integrated into the preset.
CMAA2 anti-aliasing — a high-quality, non-temporal alternative to TAAFeature. Two compute passes (local-contrast-adaptive edge detection
Final HDR → SDR composite that also draws stars and depth/height fog, sampling the auto-exposure storage buffer for tonemapping. Replaces TonemapFeature in pipelines that have an AutoExposureFeature (the composite reads the exposure buffer; tonemap does not).
Initializes frame.hdr to a flat color. The simplest of the three sky
options — no panorama lookup, no scattering integration, just a clear that
gives downstream lit passes (deferred lighting, forward, forward+) something
to load from. Pick this when the scene has its own opaque background or you
only need a solid fill.
Draws world-space colored line segments over the lit HDR — the engine's
"visible collision shapes" / debug-line view. Feed it line-list vertices via
DebugLinesFeatureOptions.source (e.g. buildPhysicsDebugLines from
taos/physics, or any editor-built wireframe set).
Deferred lighting. Reads frame.gbuffer, frame.shadowMap, frame.ao,
frame.hdr (clear/load behavior matches the legacy DeferredLightingPass
deps), and writes the final HDR result into frame.hdr. Exposes the
persistent camera/light uniform handles on frame.lightingCameraBuffer /
frame.lightingLightBuffer for downstream features (composite, godrays).
Depth-of-field post-process. Reads frame.hdr + frame.gbuffer.depth,
writes the result back into frame.hdr.
Forward-lit PBR pass. Loads frame.hdr if a previous feature wrote it (e.g.
a sky), otherwise creates fresh HDR + depth attachments. Reads
frame.opaque (and frame.transparent if the pass supports it) for draws.
Hybrid forward overlay used by deferred pipelines to draw transparent
meshes on top of the lit deferred result. Loads frame.hdr and the
frame.gbuffer.depth (so transparents depth-test against opaque) and
writes back into frame.hdr. Reads frame.transparent.
Tiled forward+ pass — wraps ForwardPlusPass. Reads frame.opaque +
frame.transparent for draws (transparents shade after opaques, depth-tested
but not depth-written), optional frame.shadowMap + cascades for the
directional sun, and the caller-supplied many-light list. Loads frame.hdr
if set, otherwise clears.
FXAA 3.11 anti-aliasing — the cheapest spatial alternative to TAAFeature / SMAAFeature. A single fullscreen edge-directed blur: no camera jitter, no history, no temporal ghosting, and (unlike SMAA) no precomputed lookup textures. The natural low-end / no-history fallback.
Deferred geometry pass for material-bearing meshes. Reads frame.opaque and
writes the GBuffer into frame.gbuffer. When frame.gbuffer is already set
(e.g. by a preceding voxel or marching-cubes feature) this feature loads it
and overdraws — letting a deferred scene mix voxel terrain with regular
mesh objects.
Sun-shaft godrays. Reads frame.hdr + frame.gbuffer.depth +
frame.shadowMap + the lighting feature's persistent camera/light uniform
handles, writes the lit-with-shafts HDR back into frame.hdr. Register
AFTER DeferredLightingFeature.
High-quality volumetric clouds — half-res raymarch + multi-scatter octaves
frame.hdr and reads frame.depth. The cloud volume composites over the
supplied HDR (premultiplied alpha) so foreground geometry occludes clouds
via the scene-depth gate inside the raymarch.Screen-space lens flare from a distant sun, wrapping LensFlarePass.
Each frame it projects the sun to screen space (using the render camera),
zeroes the flare when the sun is behind the camera, and lets the pass occlude
it against scene depth. Reads frame.hdr + frame.depth, writes frame.hdr.
Register AFTER the sky/lighting features and BEFORE tonemap.
Motion-blur post-process. Reads frame.hdr + frame.depth, writes the
blurred HDR back into frame.hdr.
Wraps ParticlePass as a RenderFeature. Reads
frame.depth (set by whichever geometry/forward feature ran before),
loads frame.hdr, and writes the blended HDR back into frame.hdr.
Point + spot light shadows (cube VSM + 2D VSM + projection-texture array)
plus the deferred-style additive lighting pass that consumes them. Reads
frame.gbuffer, accumulates onto frame.hdr and writes back.
Composites unlit projection textures onto frame.hdr after lighting.
Reconstructs world position from frame.depth, so it needs a geometry/lighting
feature to have produced a depth buffer and an HDR target.
Projects lit ("painted-on") textures into the G-buffer albedo before deferred lighting, so the projected image then receives scene light and shadow like a surface decal. Must run after the geometry feature (depth + albedo present) and before the deferred lighting feature.
Discovers ReflectionProbe components in the scene each frame, allocates them slots in a shared cube-array, and inserts a ReflectionProbeCapturePass + ReflectionProbeIblPass chain to keep their captured environment + IBL convolutions up to date according to each probe's ReflectionProbe.updateMode.
Sample-Distribution Shadow Maps (SDSM) depth feedback, as a RenderFeature.
Cascaded directional shadow map. Writes frame.shadowMap and stashes the
frame's cascades + caster list on frame.extras for downstream consumers
(e.g. a BlockShadowFeature chain).
Skinned/animated mesh deferred geometry. Composes on top of an existing
GBuffer (set loadOp: 'load') so the regular GeometryFeature's
output is preserved.
Renders the sky as a fullscreen background by sampling an equirectangular
HDR texture, clearing the HDR target. Writes frame.hdr.
SMAA 1x anti-aliasing — a spatial, single-frame alternative to
TAAFeature. No camera jitter, no history, no temporal ghosting; it
cleans up edges within the current frame using SMAAPass's three
sub-passes. Register it where post-processing belongs (after lighting /
overlays, before bloom / tonemap).
SMAA T2x — SMAA 1x (spatial morphological AA) combined with 2× temporal supersampling. Higher quality than SMAA 1x, plain TAA, or the upscaler: each frame is rendered at one of two sub-pixel jitter positions and cleaned by SMAA, then the two are resolved over time (reprojected + neighborhood-clamped). SMAA pre-cleaning the edges each frame means the temporal stage fights far less aliasing, so the result is crisp with little of TAA's ghosting/softening.
Screen-space global illumination feature.
Screen-space reflections. Marches frame.hdr rays against frame.gbuffer.depth,
picks reflections from the lit HDR, and composites them back into frame.hdr.
Register between deferred lighting and post-processing.
Procedural starfield as a render feature wrapping StarsPass. Reads
frame.hdr + frame.depth, adds stars on sky pixels (depth == 1), and
writes the result back into frame.hdr. Register AFTER the sky / lighting
features (so the HDR + depth exist) and BEFORE bloom + tonemap (so bright
stars bloom and get tonemapped with the rest of the scene).
Temporal anti-aliasing. Camera sub-pixel jitter is applied in
earlyUpdate so every feature's regular update (and thus every
geometry-fill pass's updateCamera) sees the jittered VP via
camera.jitteredViewProjectionMatrix(). The TAA resolve pass itself runs at
post-process time — register this feature wherever post-processing belongs
in the pipeline (after lighting, before bloom/tonemap).
Temporal upscaler (FSR2-style). Drives ctx.setRenderScale so the whole scene
renders sub-native, then resolves to display resolution by accumulating a
reprojected history with the Catmull-Rom-upsampled current frame. The marquee
"modern AA" path: anti-aliasing and a performance win. With renderScale: 1
it degrades cleanly to a high-quality TAA (supersedes TAAFeature).
Final HDR → SDR tonemap. Reads frame.hdr and writes the backbuffer.
Mutate exposure / tonemapper (or the legacy aces) directly on this
feature at runtime; the next frame's update re-uploads the params buffer.
Forward refractive transmission overlay (KHR_materials_transmission +
KHR_materials_volume). Slots in after deferred lighting (and any forward
overlay): it snapshots frame.hdr, draws the glass meshes refracting that
snapshot, and writes the composite back to frame.hdr, depth-testing against
the opaque scene depth (frame.gbuffer.depth in deferred, frame.depth in
forward).
Generates the shared screen-space velocity buffer once per frame and exposes
it on Frame.velocity. Re-rasterizes the frame's mesh + skinned-mesh
draws with the current and previous view-projection + model/joint matrices
into an rg16float UV-delta target (camera and per-object motion).
Froxel volumetric fog. Reads frame.hdr + frame.gbuffer.depth +
frame.shadowMap + the lighting feature's persistent camera/light uniform
handles, writes the fogged HDR back into frame.hdr. Register AFTER
DeferredLightingFeature (and after godrays/clouds if both are used).
Voxel-cone-traced global illumination feature.
Packs many static projector images into one texture_2d_array, so a scene
with dozens of projectors costs a single texture instead of one GPUTexture
each. Each image is shelf-packed into a layer and addressed by an
AtlasSlot (layer + normalized uvRect); the projector pass samples
a per-layer '2d' view and composes the packing rect with the projector's
own crop.
Bakes the aerial-perspective froxel volume each frame: one compute dispatch marching a 32×32 grid of view rays through 32 squared-depth slices (see aerial_volume.wgsl). DeferredLightingFeature runs it whenever aerial perspective is enabled and hands the two 3D textures to DeferredLightingPass, which applies the haze with a single trilinear tap per shaded pixel.
Bakes the atmosphere transmittance + multi-scattering LUTs. Both are persistent textures stored in the graph's cache; this pass only adds actual bake sub-passes the first time it sees the graph (and again any time markDirty is called — e.g., when atmosphere parameters change). On idle frames the LUTs are merely imported as handles.
Renders an atmospheric sky dome into the supplied HDR target (render-graph version).
Auto-exposure compute pass (render-graph version).
G-Buffer fill pass for voxel world chunks (render-graph version).
Voxel-world chunk shadow pass (render-graph version).
HDR bloom (render-graph version). Prefilter -> 2× H/V blur ping-pong -> composite, all on transient half-res textures except the final full-res result.
Volumetric cloud + procedural sky pass (render-graph version).
Compute cluster cull for a ClusteredMesh: one thread per cluster tests
frustum + normal-cone backface + optional Hi-Z occlusion, compacts survivors
into a visible-cluster list, and writes the non-indexed drawIndirect args.
Writes a ClusteredMesh into the ENGINE deferred G-buffer (albedo+roughness,
encoded world-normal+metallic, emissive, depth — loadOp: 'load') by vertex
pulling + one drawIndirect over the cull pass's visible-cluster list. Lets the
stock DeferredLightingPass light clustered geometry unchanged. The
params/params2/params3 targets are left to their cleared defaults
(DefaultLit dielectric), so it only attaches the first three color targets.
Deferred G-buffer pass for a ClusteredMesh, drawn by vertex pulling +
a single drawIndirect over the cull pass's visible-cluster list (no mesh
shaders, no vertex/index buffers). Writes a compact G-buffer (albedo+roughness,
encoded world normal+metallic, depth) a deferred lighting pass can consume.
Renders a ClusteredMesh into a directional shadow map's cascades — one
compute cull (frustum only; cone culling OFF and the near plane skipped, since
back-facing / in-front casters still shadow) + one depth-only vertex-pulling
drawIndirect per cascade, loading into each layer. Lets clustered geometry
cast CSM shadows alongside regular meshes.
CMAA2 — Conservative Morphological Anti-Aliasing 2 (compute, render-graph version).
Final fullscreen pass that composes the post-processed HDR scene with fog, stars, the underwater effect and tonemapping into the backbuffer (render-graph version). Replaces the legacy fog + underwater + tonemap pass chain by combining all three operations in a single fragment shader, eliminating two intermediate HDR textures and two render-pass boundaries.
Visualizes the SSAO/GTAO/HBAO+ output as a grayscale image on the backbuffer. Mirrors the debug-AO short-circuit inside CompositePass but ships as a standalone pass so non-composite pipelines can use it.
Deferred lighting pass (render-graph version).
Reduces a depth texture to the min/max view-linear depth of its non-sky
texels, into an 8-byte buffer ([minBits, maxBits], IEEE-ordered u32). The
SDSM feature copies that out to the CPU (one frame later) and fits the shadow
cascades to exactly the visible depth slab. See [SdsmFeature].
Converts the directional cascaded depth shadow map into a pre-filtered EVSM2 moment map for variance-based shadow sampling.
Two-stage depth-of-field post-process (render-graph version).
Standalone fog post-process: blends the input HDR toward an atmosphere-scattered fog color using configurable depth + height curves. Mirrors the fog block inside CompositePass but ships as a discrete pass so pipelines that don't use the merged composite can still get fog.
Forward+ (tiled forward) render pass.
FXAA 3.11 — Fast approximate anti-aliasing (render-graph version).
Deferred geometry pass for material-bearing meshes (render-graph version).
Ground Truth Ambient Occlusion (Jiménez et al., GDC 2016).
HBAO+ (NVIDIA Horizon-Based AO, plus variant).
Builds a Hi-Z (hierarchical depth) pyramid from the scene depth buffer for GPU occlusion culling. Run it after the geometry you want to treat as occluders (e.g. terrain) has written depth, then feed the pyramid to GpuCullPass to skip geometry hidden behind it.
High-quality volumetric cloud pass. Half-resolution Beer-Lambert ray-march with multi-scatter octaves and cone-sampled light marching, then a full-res temporal-reprojection upsample that uses each pixel's weighted cloud-hit depth (not the scene depth) to look up history. Outputs are composited over the supplied HDR target with premultiplied alpha.
GPU particle system pass (render-graph version).
Volumetric cloud pass for spherical planets.
Deferred point + spot lighting (render-graph version). Reads the GBuffer + VSM/projection textures and additively blends point/spot light contribution into the existing HDR target.
Builds variance shadow maps for shadow-casting point and spot lights (render-graph version). Uses a 'transfer' graph node and runs many internal render sub-passes (one per cube face / spot slot) inside a single setExecute.
Renders reflection-probe environment cubes. For each pending bake the pass
runs 6 internal render sub-passes (one per cube face), drawing the sky into
each face and, in 'scene' mode, the supplied meshes on top with simple
forward shading.
Convolves each freshly-captured reflection probe cube into its irradiance
IblBaker but the source is one
slice of a cube-array (see reflection_probe_ibl.wgsl).Cascaded shadow map (CSM) pass for the scene's directional sun light (render-graph version).
Geometry pass for skinned (animated) meshes (render-graph version).
Renders the sky as a fullscreen background by sampling an equirectangular HDR texture (render-graph version).
SMAA 1x — Subpixel Morphological Anti-Aliasing (render-graph version).
Screen-space ambient occlusion pass (render-graph version).
Screen-space global illumination (render-graph version).
Screen-space reflections (render-graph version).
Standalone procedural starfield pass. Adds stars only on sky pixels and fades them with the sun's altitude (night-only). Add this before any final tonemap so stars are reshaped along with the rest of the scene.
Temporal anti-aliasing pass (render-graph version).
Temporal upscaler (FSR2-style, render-graph version).
Final HDR-to-SDR tone-mapping pass (render-graph version).
Forward refractive pass for KHR_materials_transmission + KHR_materials_volume.
Snapshots the lit HDR, then draws each transmissive mesh sampling that snapshot
with a screen-space IOR refraction + Beer-Lambert volume absorption, plus a
Fresnel environment reflection. Composites back onto the HDR with depth test.
Standalone underwater post-process: sinusoidal UV ripple on the HDR sample,
a blue cast and a soft radial vignette. Math is shared with the merged
CompositePass via the postfx_underwater.wgsl shader module.
Froxel volumetric fog (render-graph version). A view-aligned 3D grid is filled with participating-media density (global height fog + local box volumes) and sun in-scattering (HG phase × cascade shadow + ambient), integrated front-to- back into per-froxel scattering + transmittance, then composited over the HDR scene. Reuses the deferred lighting pass's persistent camera/light uniforms so the sun shafts line up with the lit scene. Register AFTER DeferredLightingFeature.
Abstract base class for a render graph pass.
Pool of GPU textures and buffers keyed by descriptor. Survives graph compile/execute cycles so transient virtual resources can be backed by the same physical objects across frames without recreation, and so that persistent resources (shadow maps, TAA history, IBL data) live across graph rebuilds.
RenderGraph: declares passes, compiles a dependency graph from their read/write declarations, and executes them in topological order against pooled physical resources.
Named cache and lifetime owner for shared meshes, textures, and shaders.
A set of three aligned block atlases (color, normal, MER) for voxel-style rendering.
Fixed-budget LRU residency policy over pageCount pages and slotCount slots.
GPU-resident paged cluster mesh. Exposes the cull-facing fields a ClusterCullPass needs (clusterBuffer / lodBuffer / clusterCount) plus the paged geometry buffers a PAGED draw shader binds (vertexBuffer / meshletVertexBuffer / localIndexBuffer / pageBaseBuffer / clusterPageIdBuffer).
A source of v3 page payloads, backed by HTTP Range or an in-memory buffer.
GPU-resident clustered mesh: the four storage buffers a vertex-pulling cluster
pass binds. Owns its buffers; call destroy to release them. Built from
the COMPACT PackedClusterData (quantized vertex pool + u8 indices).
Loader for binary glTF 2.0 (.glb) assets.
Static (non-skinned) GPU mesh: an interleaved vertex buffer plus a 32-bit index buffer.
Wraps a compiled WGSL shader module with its label.
GPU mesh with skinning attributes (joint indices and weights) per vertex.
Owns a GPUTexture and a default GPUTextureView of the matching dimension.
Component that plays GLTF skeletal animation clips on a skinned model.
Plays the scene-node side of glTF animation: rigid TRS on ordinary (non-joint) nodes and per-mesh morph-target weights.
Plays KHR_animation_pointer channels — animation that drives non-transform properties via JSON pointers. Currently applies the material subset (emissive / base color / metallic / roughness / alpha-cutoff / transmission / ior / clearcoat); light / camera / node pointers are parsed-but-skipped.
Drives a skinned model from an animation blend tree or state machine, the richer counterpart to AnimatedModel's single-clip playback.
Drives the AudioEngine's 3D listener from its GameObject's
world transform — attach it to the camera. Each frame it derives the listener
position, forward (-Z of the object), and up (+Y) from the world matrix
and forwards them to AudioEngine.updateListener.
Plays a sound that tracks its GameObject's world position. A thin component wrapper over AudioEngine.playAt: each frame it pushes the object's world translation into the live SoundHandle's panner, so the sound moves with the object.
Pins its GameObject to a skeleton joint — the engine's equivalent of Godot's
BoneAttachment3D. Each frame it copies the bone's model-space transform (plus
an optional local offset) onto the owning GameObject, so a weapon, a muzzle
marker, a laser origin, or an effect emitter parented under the model root
tracks that bone as it animates.
Camera component. Drives view/projection matrices used by every render pass that needs the main view (geometry, shadows, post).
Scene authoring handle for the volumetric cloud layer. Mirrors the
renderer's CloudSettings as friendly, editable fields; a host (the editor,
or any app) reads these and pushes them into the registered
CloudFeature.settings. Adding this component to a scene is the signal that
clouds should render — the editor enables the feature while a Clouds
component is present.
Scene authoring handle for the high-quality volumetric cloud layer
(HQCloudPass / HQCloudFeature) — the photoreal multi-scatter clouds, as
opposed to the cheaper flat-slab Clouds. A host (the editor, or any
app) reads these fields and pushes them into the registered
HQCloudFeature.settings. Adding this component to a scene is the signal that
HQ clouds should render; a scene should use either Clouds or
HQClouds, not both.
Projects a texture (or video) onto scene surfaces from this GameObject's transform — the unlit, shape-controlled counterpart to a textured spotlight.
Reflection probe component. Renders the environment around the probe's world position into a cubemap, then convolves that cube into an irradiance
Scene authoring handle for the render pipeline's post-processing stack. Holds an ordered list of enabled effects and their settings; a host (the editor) maps each entry onto the pre-registered render features, enabling and configuring them every frame. Effects absent from the list stay disabled.
Scene authoring handle for the procedural atmosphere. Carries a friendly,
curated subset of the atmosphere LUT parameters; the editor (or any host)
reads these and pushes them into the registered atmosphere render features
via engine.getFeature(AtmosphereFeature) / AtmosphereLutsFeature.
Authoring volume for VxgiFeature — the editor/engine analog of
Godot's VoxelGI node. Place it on a GameObject (the transform's world
position is the grid center) and set the box extents + quality knobs; when a
scene contains one, the VXGI feature centers + sizes its voxel grid from it
instead of the feature's constructor defaults. No bake step — voxelization is
per-frame.
Dual free-fly + orbit camera controller, in the spirit of PlayCanvas's CameraControls.
Polled Gamepad-API input source. Construct directly for a long-lived pad, or use setupGamepadControlsLazy to defer until the first connect.
Robust held-key tracker for keyboard-driven controllers.
Held-button + position tracker for mouse-driven controllers, mirroring KeyboardInput. Tracks the cursor position (CSS pixels, relative to the page), which buttons are held (0 = left, 1 = middle, 2 = right), and an accumulating wheel delta that callers drain each frame.
Mobile/touch input overlay. Owns the joystick, look-drag region, and any caller-registered buttons. The host game wires behavior through callbacks; the class itself never touches game state directly.
Reusable SDSM depth feedback: owns a DepthReductionPass and an async readback ring, and exposes the visible scene's view-linear depth bounds.
Read-only queries over a CatalogDoc: bundle lookup, asset→bundle mapping, label expansion, dependency ordering, and variant selection.
The whole archive already resident in memory (e.g. a bundle built at runtime, or one fully downloaded).
Streams entries out of a remote archive with HTTP Range requests, so a single asset can be pulled from a large bundle without downloading the whole thing.
Named runtime inputs to an Animator graph. Scripts set these each frame; the graph reads them to position blend spaces and fire transitions.
A leaf node: plays one clip, looping or clamping at its duration.
Blends along a single axis (a gait blend: idle → walk → run by position).
Samples are interpolated linearly between the two that bracket position,
clamping past the ends.
Blends across a 2D space (the 4-way strafe blend: front/back/left/right keyed by aim direction). Weights come from normalized inverse-square distance (Shepard interpolation), so the blend is exact at each sample point and smooth between them, and handles cardinal point layouts without triangulation.
Layers an additive offset on top of a base pose — the aim-offset / lean layer.
weight (0..1) scales the additive contribution, measured relative to ref
(the additive sub-tree's neutral pose, captured at construction).
One skeleton's local-space joint TRS. Arrays are owned and reused.
A node in a blend tree. Owns the out pose it produces.
Plays a transform keyframe clip on its GameObject — the runtime for the editor's Timeline panel (Godot's AnimationPlayer, transform-track subset). Advances only while the scene simulates (dt > 0, i.e. during Play), so it never clobbers the authored transform in the editor; the Timeline scrubs a preview via applyAt. On Stop the editor's snapshot restores the authored pose.
Moves its GameObject along a navmesh path to target — Godot's NavigationAgent3D, minus avoidance. It finds the baked navmesh from a NavigationRegion in the scene, repaths when the target moves, and steps toward it each frame (so it only moves while the scene is simulating — in the editor, during Play). A script sets target via setTarget; the editor Inspector exposes it directly.
Caller-supplied asset resolution for component construction. Every method is optional; a factory that needs one the resolver doesn't provide should degrade gracefully (e.g. leave a placeholder). All are async — factories build the component synchronously and fill the asset in when the promise resolves, exactly as the editor's load path does.
G-Buffer handle set produced by deferred geometry features and consumed by AO, deferred lighting, and post-processing. Matches the per-pass shape used by GeometryPass / BlockGeometryPass / SkinnedGeometryPass.
Per-frame context handed to every RenderFeature. Engine populates the
pre-bucketed draw lists, camera, timing, and the active RenderGraph
before invoking update and addPasses on the registered features.
A unit of rendering work — one or more passes plus the per-frame update and graph-wiring logic that owns them. Features are registered with the Engine at startup (typically via a preset) and drive everything the engine does each frame.
Options for Signal.connect.
Abstract base for shader+data bundles consumed by the geometry, forward, and skinned-geometry passes.
Options accepted by RenderContext.create.
OpenPBR Surface inputs (v1 subset). Defaults follow the OpenPBR spec's default surface where practical. Colors are linear RGB.
One texture's UV transform (glTF KHR_texture_transform). Matches the shared
PbrMaterialOptions.uvOffset/PbrMaterialOptions.uvScale/
PbrMaterialOptions.uvRotation semantics, applied per texture.
Per-cascade data produced by DirectionalLight.computeCascadeMatrices and consumed by the cascade shadow map render passes.
Construction options for DirectionalLight. Every field is optional and
maps to the like-named property; omitted fields keep the property default.
There is deliberately no direction — a directional light aims via its
GameObject's transform (local -Z); see DirectionalLight.worldDirection.
Construction options for PointLight. Every field is optional and maps
to the like-named property; omitted fields keep the property default. There is
no position — a point light is placed by its GameObject's transform; see
PointLight.worldPosition.
Construction options for SpotLight. Every field is optional and maps to
the like-named property; omitted fields keep the property default. There is no
position/direction — a spot light is placed and aimed by its GameObject's
transform; see SpotLight.worldPosition / SpotLight.worldDirection.
Color-grading stack. Every field is optional and defaults to a neutral
(identity) value, so a bare {} grades nothing. Mutate any field on a live
TonemapFeature.grade object and the next frame re-uploads it.
Photographic camera settings driving a fixed, physically-based exposure.
A clustered (meshlet) mesh instance drawn into the deferred G-buffer.
Snapshot of the cube-array textures + per-probe UBO used by the deferred lighting pass to sample probes. Stashed on Frame.extras under REFLECTION_PROBE_BINDINGS_KEY.
Photographic camera exposure settings.
Chromatic-aberration (lens fringing) settings.
Radial corner-darkening vignette.
Radial lens distortion (Brown–Conrady polynomial).
Panini projection (wide-FOV horizontal de-stretch).
Animated film-grain noise.
Lens & film post-FX stack. Every field is optional; a sub-effect runs only
when its object is present and not { enabled: false }. Mutate any field on a
live TonemapFeature.postFx object and the next frame re-uploads it.
Minimal view of a ProjectorAtlas an AtlasSlot needs — a source-side interface so this module doesn't depend on the atlas class.
A static image packed into a layer of the shared projector atlas array.
A standalone 2D texture owned by the caller (large static image, or one the app re-uploads itself).
A playing video. Content changes per frame, so it can't be atlased.
The same AtmosphereParams the standalone atmosphere pass uses. Required for the LUT bakes — the LUTs only depend on these (not on sun direction or camera position), so they can be baked once and reused across frames.
Per-field atmosphere overrides exposed by AtmospherePass.setPlanet.
Top-level planet configuration accepted by AtmospherePass.setPlanet.
The engine G-buffer attachments this pass loads + overdraws.
The subset of AtmosphereParams the aerial-perspective fog needs, plus the analytic height-fog layer parameters.
Screen-space contact-shadow tuning for the sun (see DeferredLightingPass.setContactShadows).
Directional light cookie (gobo) — a texture projected along the sun. See DeferredLightingPass.setCookie.
GPU resources the lighting pass needs to bind for reflection-probe
sampling. ReflectionProbeFeature builds this and routes it through
the DeferredLightingFeature into DeferredLightingDeps.probes.
One mesh instance to be drawn into the G-Buffer this frame.
normalMatrix is the inverse-transpose of the upper 3×3 of modelMatrix,
stored as a Mat4 for uniform alignment.
A group of identical-geometry instances drawn in ONE drawIndexed call via
GPU instancing (the geometry shader's HAS_INSTANCING variant). All instances
share mesh + material; each instance's transform comes from instanceData,
indexed by @builtin(instance_index).
Per-frame config for opt-in GPU occlusion culling on a GeometryPass.
Supply the Hi-Z pyramid produced by HiZPass (built from depth that already
holds your occluders) and the camera VP that rendered it. When set, the pass
draws via drawIndexedIndirect and a compute pass zeroes the instanceCount of
instances outside the frustum or hidden behind the Hi-Z surface.
GPU instance culling: one compute thread per instance tests its bounding sphere against the camera frustum and (optionally) a Hi-Z pyramid, zeroing the instanceCount of culled instances in their indirect draw args.
Earth-scale atmosphere parameters (mirrors EARTH_PARAMS in atmosphere_pass.ts
and EARTH_ATMOSPHERE in atmosphere_model.wgsl). Static — the cloud pass
writes these into the atmosphere uniform once at creation; the sun direction
(which is what actually moves the sky) comes from the per-frame light buffer.
Match these to the params passed to AtmosphereFeature if a scene uses a custom
planet, or pass an override via HQCloudPass.create's atmosphere opt.
A persistent dynamic-wave disturbance source. Re-applied every frame at
its current position — update it from game code (e.g. a beforeFrame
hook tracking a boat) to drive a moving wake.
A procedural flow vortex — a swirl of tangential water velocity around a world XZ center (a whirlpool, an eddy).
A directed line current between two world-XZ points — chain several to route a river's flow along a winding channel.
A circular region where the water surface sits at a different level than the base sea — a mountain lake, a lowered pond.
One link of a sea-level offset STRIP: the water surface offset lerps from
y0 at (x0, z0) to y1 at (x1, z1) across a capsule of the given width.
Chain several (sharing endpoints) to step a river's surface downhill;
overlapping links resolve by max, so joints stay seamless. Keep the
feathered edge inside the channel banks, like the circular regions.
A circular clip-surface region bounding the water body (Crest's clip surface, as a procedural disc).
Procedural horizontal flow driving surface-detail advection.
One authored water spline: a center-line of [x, surfaceY, z] points
(surfaceY = ABSOLUTE world height of the water surface there — what a
level designer reads off the terrain), plus the strip shape.
Flow derivation options for OceanWaterSpline.
A contributor to the ocean's raw per-LOD displacement texture. Lifecycle:
Construction-time options for ParticlePass.create.
Per-mesh draw item for the scene capture mode. The probe feature builds these from the scene's MeshRenderers, filtered by the probe's capture extent.
One probe's bake request for a single frame. The manager fills these, one per probe that needs an update this frame, and passes them to the capture pass via ReflectionProbeCapturePass.setBakeRequests.
Per-frame lighting parameters shared by every probe baked this frame. Set once by the feature before ReflectionProbeCapturePass.addToGraph.
A skinned shadow caster. Rasterized into every cascade with GPU vertex
skinning, so an animated mesh casts its live pose rather than a static
bind-pose proxy. jointMatrices is the same skinning palette the lit draw
uses (16 floats per joint).
A group of identical skinned-mesh instances drawn in ONE drawIndexed call via
GPU instancing (the skinned shader's HAS_INSTANCING variant). All instances
share mesh, material and a single jointMatrices palette (the identity bind
pose for static level geometry — skinning is then a no-op); only the per-instance
model/normal matrix varies. Collapses a level's reused mesh library (hundreds of
per-node draws) into a handful of instanced draws. No morph targets.
One refractive (glass / amber) mesh to draw in the transmission pass.
An axis-aligned box of denser, optionally tinted fog.
Anything carrying a local-space bounding sphere (e.g. Mesh).
Internal: declared (uncompiled) pass. Captures the user's reads/writes, the new resources it created, and the execute callback. The compiler turns this into a CompiledPass.
Context handed to the pass's execute callback.
Resolved access to physical GPU resources, scoped to a single pass execution.
Builder handed to the pass's setup function. Declares how the pass uses
resources and registers its execute callback. Each call to write
returns a fresh handle whose version is incremented; the compiler uses
these versions to wire dependencies precisely.
A PassNode after culling/sort, ready to execute.
The output of RenderGraph.compile: an ordered list of passes plus the bindings from virtual resource id to the physical GPU object that will back it during execute.
Opaque, versioned reference to a virtual resource (texture or buffer).
Each PassBuilder.write call returns a new handle whose version is
incremented; this lets the compiler distinguish "the texture before this
write" from "the texture after this write" and detect stale reads.
Describes a virtual texture's allocation parameters.
Describes a virtual buffer's allocation parameters.
Per-attachment metadata supplied alongside an 'attachment' /
'depth-attachment' write. The graph consumes this to build the
GPURenderPassDescriptor; the pass execute callback never builds the
descriptor itself.
Pair of tileable 3D noise textures used for volumetric cloud rendering.
A ClusterData augmented with the LOD-DAG records.
Dequantization grid: pos = min + normalized * extent.
The compact, GPU-ready form of a cluster mesh — what ClusteredMesh uploads and serializeClusterDag writes. Descriptors / LOD records / bounds stay in real local-space units (the cull pass reads them unchanged); only the vertex pool and corner indices are quantized.
One self-contained streamable page.
A PackedClusterData partitioned into ClusterPages.
One page's table-of-contents entry (no geometry).
Header + always-resident block + TOC of a v3 asset — everything but the page
geometry. Enough to drive streaming (page payloads are fetched by byteOffset).
A page's three geometry arrays.
A page transition the GPU side must apply.
Flat CPU arrays for the resident pool (pure; the GPU upload mirrors them).
CPU-side result of buildClusters — the flat arrays a vertex-pulling cluster shader needs, plus bookkeeping. Upload with ClusteredMesh.
Options for StreamingClusterPool.
Decoded OpenEXR image as linear floating-point RGBA.
One renderable primitive parsed from a glTF mesh.
One scene node from the glTF node graph, with defaults filled in. parent is
the parent node index (-1 for roots); mesh/skin are -1 when absent.
One KHR_lights_punctual light, with spec defaults filled in. The light's placement comes from the node it is attached to (see GltfNodeInfo.light): point lights use the node's world position; directional and spot lights shine down the node's local −Z axis. Intensity is in the glTF's physical units — candela (lm/sr) for point/spot, lux (lm/m²) for directional.
One renderable primitive parsed from a glTF mesh as a static (non-skinned) mesh.
Result of GltfLoader.loadStatic: plain Mesh primitives plus the resolved node graph, so callers can place each primitive by its owning node's world transform exactly as the skinned loader does.
Device-free packed geometry for one static primitive, in glb mesh→primitive flat order (the same order GltfLoader.loadStaticFromArrayBuffer walks).
Decoded Radiance HDR (.hdr) image in raw RGBE form.
A parsed LM-63 photometric distribution. Candela is indexed [h][v].
Construction options for AnimatedModel. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required GltfModel stays a positional constructor arg.
Construction options for AnimatedNodes. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required GltfModel stays a positional constructor arg.
Construction options for AnimatedProperties. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required GltfModel stays a positional constructor arg.
Construction options for Animator.
Configuration for an AudioSource.
Anything that exposes a skeleton and its current per-joint global (model-space) matrices — both Animator and AnimatedModel qualify. A BoneAttachment reads from one of these to follow a bone.
Construction options for BoneAttachment.
Construction options for Camera. Every field is optional and maps to
the like-named property; omitted fields keep the property default. fov is in
radians (the raw property) — for degrees use Camera.createPerspective.
Construction options for Clouds. Every field is optional and maps to the like-named property; omitted fields keep the property default.
Construction options for HQClouds. Every field is optional and maps to the like-named property; omitted fields keep the property default.
Construction options for MeshRenderer. Every field is optional and maps to the like-named property; omitted fields keep the property default. The required Mesh and Material stay positional constructor args.
Construction options for Projector. Every field is optional and maps to the like-named property; omitted fields keep the property default. Vec/object fields are adopted by reference.
Construction options for ReflectionProbe. Every field is optional and maps to the like-named property; omitted fields keep the property default.
One configured effect: its type plus a free-form settings bag (keys defined by the authoring layer's metadata table).
Construction options for Render. Every field is optional and maps to the like-named property; omitted fields keep the property default.
A single animation track: keyframes for one property of one node.
A named skeletal animation made up of per-joint TRS channels.
Resolved KHR_animation_pointer target (only material targets are supported).
View-space linear depth bounds of the visible scene.
One asset to place into a bundle.
Result of buildBundle: the finished archive and its final TOC entries (with resolved offsets/sizes), handy for emitting a catalog.
Options for buildBundle.
A platform-specific alternative build of a bundle (e.g. mobile-sized textures).
One bundle in the catalog.
Per-asset entry: which bundle owns the key, plus its labels.
The serialized catalog.json.
One asset stored in a bundle. offset/storedLen locate the (possibly
compressed) blob; rawLen is its decompressed size.
The table of contents: every entry in the archive.
Decoded footer fields.
A loaded bundle: its id and a reader for its entries.
Load progress over the manager's lifetime (cumulative bundle counts).
Construction options for a BundleManager.
Texture-compression formats a device can sample.
Capabilities used to select bundle variants.
A platform variant of a group. v1 only supports 'explicit' (the variant is
authored from separately-listed sources); auto downscale/transcode is a
follow-up.
Selection rules for which project assets land in a group.
One authored group → one .bundle.
The serialized bundles.json.
One resolved asset destined for a bundle, with its bytes already read.
A finished archive ready to write to disk.
Output of publishBundles: archives to write + the catalog.
A random-access view over an archive's bytes.
A live graph + its parameter bag and the per-frame parameter push.
A node in a blend tree. Owns the out pose it produces.
One sample point on a 1D blend axis.
One sample point in a 2D blend space, at position (x, y).
One property track: keyframe times (ascending) + flat values (componentCount each).
A transform keyframe clip: length, loop flag, and per-property tracks.
A transform sampled from a clip; only the animated properties are present.
A named state backed by a pose-producing node.
A cross-fade transition between states.
How a Circuit attaches to a GameObject. Like ScriptComponentDoc in
scene_format.ts, circuit is the stable guid of the .circuit asset; the
host resolves it, ensures the generated TS is compiled, and applies values
(per-instance overrides of exposed variables).
Root-motion extraction config (see Animator.rootMotionDelta).
A component in an assembly/serialized node: its stable id plus serialized payload.
A GameObject in id-preserving on-disk form — the persisted twin of the
editor's in-memory ObjectNode. Transform/flag fields are omittable (default
= identity / true / origin) to keep files small, mirroring GameObjectDoc.
A scene (or assembly) node that is an instance of an assembly: a link to the source asset plus the sparse AssemblyOverride delta applied on top of it. The instance's own placement (the host node's transform) is authored scene state, not an override.
A subset of TRS channels changed by a transform override.
Caller-supplied asset resolution for component construction. Every method is optional; a factory that needs one the resolver doesn't provide should degrade gracefully (e.g. leave a placeholder). All are async — factories build the component synchronously and fill the asset in when the promise resolves, exactly as the editor's load path does.
Threaded through every component factory: the live engine + optional asset resolver.
Placement + identity options for instantiateAssembly.
An editor-authored signal connection carried on the emitting component's doc:
when the Signal property named signal on that component emits, call
method on the first component of doc-type targetType on the
GameObject whose persistent id is target, forwarding the emit
arguments. Wired after instantiation (when every object exists) by
wireSignalConnections — see signal_connections.ts.
Fields common to every ComponentDoc, regardless of type.
A custom component authored as a TypeScript script under Content/. script
is the stable guid of the .ts asset (location-independent, like the asset
refs on GltfModelDoc/ParticleSystemDoc). The editor resolves
the guid, transpiles the file, and instantiates its default-exported
Component subclass at load time.
A CameraController: dual free-fly / orbit camera input driver. Added to
the camera's GameObject; only active while the scene is playing (it binds DOM
listeners to the engine canvas and drives the owner's transform each frame).
minDistance/maxDistance aren't serialized here — their Infinity default
doesn't survive JSON round-tripping — so they keep their engine defaults.
An AudioSource: plays a clip that tracks the GameObject's world
position. clip is the stable guid of an imported audio asset (wav/mp3/ogg/…),
resolved + decoded through the AssetResolver at load (like mesh/material
refs). bus names a mixer bus; the built-ins are master/sfx/music/ui/voice.
An AudioListener: drives the 3D "ears" from the GameObject's world transform each frame. Attach one (typically to the camera). No settable fields.
A RigidBody physics component (see taos/physics). shape + its dimensions
pick the collider; motion is static / dynamic / kinematic. layer/mask are
CollisionLayer bit flags. Requires the host to have imported taos/physics.
A kinematic capsule CharacterBody (see taos/physics).
A box sensor TriggerVolume (see taos/physics).
A navmesh bake box + agent params (Godot NavigationRegion3D; see taos
NavigationRegion). The baked navmesh itself is runtime-only, not serialized.
A navmesh path-following agent (Godot NavigationAgent3D; see taos NavAgent).
A transform keyframe clip authored in the Timeline panel (Godot's
AnimationPlayer, transform tracks). Played by taos KeyframeAnimator.
A single collision shape (Godot CollisionShape3D). Pure geometry at the
GameObject's transform — it has no body of its own; the nearest ancestor
StaticBodyDoc gathers it into one compound body.
A static physics body (Godot StaticBody3D) that builds ONE compound
collider from every descendant ColliderDoc (stopping at nested
bodies). The way to author level collision as an editable hierarchy of shapes.
A named runtime input to an AnimatorDoc graph — drives blend-space positions and transition conditions; a script sets it each frame.
A cross-fade transition between two states of a stateMachine node.
A declarative skeletal Animator: a glTF model (skeleton + clips) driven by a
blend-tree / state-machine graph whose blend positions and transitions read
named parameters a script sets each frame (see taos buildAnimatorGraph).
The richer counterpart to GltfModelDoc's single-clip playback.
Pins the GameObject to a skeleton joint of an Animator/GltfModel on the
same object or an ancestor (gun muzzle / weapon socket / effect emitter).
A GeoReference geospatial component (see taos/geo): the scene's
georeference — a floating origin anchored at a longitude/latitude, the
scene-wide ion token, and the attribution overlay. Streamed content comes
from sibling Geo3DTileset components. Requires the host to have imported
taos/geo.
A GeoJson vector overlay (see taos/geo), aligned to the active GeoReference frame.
A streamed geospatial layer in the active GeoReference frame (see taos/geo):
a Cesium ion asset by id, keyless raster-DEM terrain, or keyless OSM vector
buildings, selected by source.
One authored PBR material layer of a Terrain. Texture refs are asset
guids (or legacy project-relative paths).
A CDLOD heightmap Terrain (see taos/terrain).
One authored water spline of a WaterBody: a river/stream center-line.
Points are [x, surfaceY, z] world coordinates (absolute surface heights),
ordered source → mouth.
A finite water body (lake + rivers) on a terrain (see taos/terrain).
The owning GameObject's position is the water: its Y is the base surface
level, its XZ the center of the depth cache and clip disc.
Reference to a standalone .material asset by stable guid.
A glTF/GLB skinned-model renderer. asset is the project-root-relative
POSIX path of the .glb (omitted when no model is assigned yet — the
"Create > Model" menu spawns an empty one to attach a mesh to). The model is
rendered through the skinned geometry pass in bind pose.
A particle system renderer. asset is the project-root-relative POSIX path
of a .particlegraph (omitted when none is assigned yet — "Create > Particle"
spawns an empty one to attach a graph to via the Inspector). The graph is
compiled and rendered live at the GameObject's transform.
A baked-lightmap volume (Godot LightmapGI equivalent). atlas is the
project-root-relative POSIX path of the tall, vertically-sliced lightmap EXR
(each slice sliceHeight texels tall, stacked into a 2D-array texture);
mapping points at the lightmap_users.json produced from the Godot bake
(per-instance node name → atlas slice + UV rect). At runtime the overlay is
additively composited over the lit HDR for every sibling/scene
GltfModelDoc whose nodes match the mapping. See the lightmap_level
sample for the standalone reference.
High-quality (photoreal multi-scatter) volumetric clouds; see CloudsDoc for the cheaper variant.
Accumulator threaded through an instantiation walk.
Interleaved [x,y,z, r,g,b] per vertex, line-list (every two consecutive
vertices form one segment). Structurally matches physics DebugLineBuffer.
Per-pass GPU timing via the 'timestamp-query' device feature.
One node in the graph. data holds static params (constants, texture slot).
A connection from a node's output port to another node's input port.
A shader-declared parameter: a named, typed uniform the Material/MeshRenderer sets, referenced in the graph by a Parameter node.
Per-frame cull parameters for ClusterCullPass.updateParams.
Per-frame draw parameters for ClusterGBufferPass.updateParams.
Per-frame draw parameters for ClusterGeometryPass.updateParams.
Optional callback fired while a fresh render graph is being built. Use this
as the escape hatch for one-off inline passes (e.g. a brush gizmo): inspect
frame.hdr, declare a pass via frame.graph.addPass(...), and write the new
handle back into frame.hdr so downstream features pick it up.
Function that wires a bundle of RenderFeatures onto an Engine. The engine awaits the preset, so it may be async (e.g. to load assets a default sky feature needs).
Listener callback for a Signal carrying arguments A.
RGB triple.
Tonemap curve options:
'none' — clamp only (linear), no filmic roll-off.'aces' — Narkowicz single-curve ACES fit (cheap, punchy).'aces-fitted' — Hill RRT/ODT fit with the ACEScg color matrices; closer to
reference ACES (better hue retention + highlight roll-off).'pbr-neutral' — Khronos PBR Neutral (glTF Sample Viewer): preserves hue and
saturation, rolling only the brightest values off to white.
Good for material/product viewing where albedo should read
true (no ACES-style film look).'agx' — AgX (Godot 4's default): wide-gamut log + sigmoid that
desaturates highlights toward white. Soft, filmic, no
ACES hue-skew — the closest match to a Godot-rendered look.Source image accepted by ProjectorAtlas.add.
A sub-rectangle of a source image, as [offsetX, offsetY, scaleX, scaleY]
in normalized [0,1] coordinates. [0, 0, 1, 1] is the whole image.
Backend used to feed a VideoSource to the GPU each frame.
Tagged union shared by all three presets. Pick exactly one sky source per
pipeline; the preset wires the matching feature in as the first writer of
frame.hdr so downstream lit/composite passes load it.
How a ForwardPass attachment slot is sourced.
Light-culling strategy for the Forward+ pass.
A single (probe, face) capture target — the cube-array slice the face writes into.
How a SkyTexturePass output is sourced.
How TAAPass sources its resolve target.
How a pass uses a resource. Drives the GPU usage flags applied to the physical resource and the kind of pass encoder the graph creates.
Pass type: drives which encoder the graph hands to the execute callback.
Zero-based tile index into a horizontal block texture atlas (tile 0 = leftmost).
A KHR_lights_punctual light type.
Texture view dimensionality supported by the engine.
Construction options for AudioListener. The required AudioEngine stays a positional constructor arg; the listener has no settable configuration fields of its own, so this interface is currently empty and reserved for forward compatibility.
Frustum shape of a projector.
How a projector's color combines with what's already on the target.
What environment a ReflectionProbe captures into its cubemap.
When a ReflectionProbe re-bakes its cubemap.
Identifiers for the post-processing / lighting render effects a Render
component can toggle and configure. Each maps to a render feature the host
pre-registers (disabled) in its pipeline; the host reads this component each
frame and flips feature.enabled + pushes settings. Stringly-typed so the
authoring layer (editor) owns the field metadata without the engine needing
to know every knob.
How the sky background is produced.
Standard-mapping button aliases. See https://w3c.github.io/gamepad/#remapping.
Keyframe interpolation mode. Mirrors the GLTF animation sampler modes — LINEAR/SLERP between values, STEP holds previous keyframe, CUBICSPLINE uses Hermite tangents stored alongside each value.
A material factor a pointer channel can drive (mapped to a PbrMaterial field).
Turns a (resolved, absolute) bundle URL into a BundleSource.
Resolves the concrete assets a group includes (reads bytes off disk/OPFS).
Minimal injectable fetch shape, so tests can supply a mock.
How an individual bundle entry (or the TOC) is stored on disk.
One change applied to an assembly instance, addressed by a path of template
ids from the assembly root down to the target (a chain so nested instances
disambiguate; length 1 — just the root — targets the instance root itself).
Scalar/vector/authored value carried by a property override (mirrors the editor's PropValue).
Build a live component from its doc. Returns null when the type can't be built
(no registered factory, or a deliberately deferred type like Script); the
instantiator skips nulls, matching the editor's load behavior.
A predicate over an Animator's parameters, used to auto-fire transitions.
A node in an AnimatorDoc blend graph. clip plays one animation;
blend1d/blend2d blend children by a parameter; additive layers an offset;
stateMachine cross-fades between named child states.
Shader kinds a Material can reference.
A parameter's value type. color/bool share a WGSL representation with
vec3/f32 but drive different editor widgets.
Number of order-3 SH coefficients (bands l = 0,1,2).
SH band l (0, 1, or 2) of each of the 9 coefficients, in storage order.
Bytes of the std140 GPU layout: 9 × vec4
Keys other features (AtmosphereFeature, sample-local cloud passes) read from Frame.extras to find the LUT handles.
Frame.extras key the DeferredLightingFeature reads to wire probes in.
Reference illuminance values (lux) for directional lighting.
Reference luminous flux (lumens) for common incandescent-equivalent bulbs.
"Sunny 16" reference: f/16, shutter ≈ 1/ISO, ISO 100 → EV100 ≈ 15, the canonical correct exposure for a subject in direct midday sun. Handy demo/default preset.
The full image, uncropped.
Froxel volume resolution (X = Y = Z). 32³ matches Hillaire / Unreal's aerial-perspective camera volume — the haze signal is low-frequency, so a trilinear tap out of 32³ resolves it; screen resolution buys nothing.
G-buffer albedo target: rgb albedo, a = roughness.
G-buffer normal target: rgb encoded world normal (n*0.5+0.5), a = metallic.
G-buffer depth target.
Earth defaults — match the old hard-coded constants in deferred_lighting.wgsl (and EARTH_ATMOSPHERE in atmosphere_model.wgsl), so the look is unchanged until a caller supplies custom-planet params.
Persistent key for the directional EVSM2 moment map (2D array, one layer per cascade). Survives graph rebuilds like the depth shadow map it derives from.
Bytes per drawIndexedIndirect argument set (5 × u32).
Bytes per instance bounding sphere (vec4: center.xyz, radius).
Crest ocean-material defaults.
Per-frame local fog volume capacity. Must match the buffer sizing below.
Floats per cluster LOD record (48 bytes). Layout (matches the cull shader):
Default max clusters per page. With ≤64 verts/cluster this keeps a page's
unique-vertex count well under u16 and pages near ~128 KB.
Max vertices per cluster. 64 is the meshoptimizer / NVIDIA-recommended bucket
and fits a u8 local-index space comfortably.
Max triangles per cluster. meshoptimizer requires this be ≤ 512 and a multiple of 4; 124 is the canonical choice (just under a 126/128 hardware sweet spot).
Floats per GPU cluster descriptor (64 bytes). Layout (std430-friendly), matching
the Cluster struct in the cluster shaders:
Byte stride of a Mesh vertex: 48 bytes = position(12) + normal(12) + uv(8) + tangent(16).
WebGPU vertex attribute layout matching VERTEX_STRIDE: position, normal, uv, tangent.
Byte stride of an optional per-vertex color: one vec4<f32> (RGBA, linear,
normalized to [0,1]). Lives in a separate vertex buffer bound at slot 1 so
the shared interleaved layout above (and the dozens of mesh generators that
hardcode it) stays untouched — only glTF meshes with a COLOR_0 attribute
allocate one. Multiplies the base color in the geometry/forward/transmission
shaders, gated by the HAS_VERTEX_COLOR shader define.
Slot-1 vertex buffer layout for the optional per-vertex color (see VERTEX_COLOR_STRIDE).
Byte stride of a SkinnedMesh vertex: 112 bytes = position(12) + normal(12) +
uv(8) + tangent(16) + joints0(16, uvec4) + weights0(16) + joints1(16, uvec4) +
weights1(16). The second joint/weight set carries glTF JOINTS_1/WEIGHTS_1 (up
to 8 bone influences); meshes with ≤4 influences leave weights1 = 0, making the
extra four a no-op.
WebGPU vertex attribute layout matching SKINNED_VERTEX_STRIDE: position,
normal, uv, tangent, joints0 (uvec4), weights0, joints1 (uvec4), weights1.
Current catalog schema version.
ASCII magic at the start of the 32-byte footer.
Current archive format version.
Fixed footer size in bytes.
Footer flag: the TOC blob is gzip-compressed.
Reasonable desktop default (BC, large textures).
Reasonable mobile default (ASTC/ETC2, smaller textures).
Current bundles.json schema version.
Bytes per cluster LOD record (see CLUSTER_LOD_FLOATS).
Words (u32) per packed vertex in PackedClusterData.vertexPool.
u32 per ResidentArrays.pageBase record: vertexBase, mvBase, liBase, resident.
Bytes per GPU cluster descriptor (see CLUSTER_DESC_FLOATS).
Component counts per property value: TRS vectors are 3, rotation is a quat (4).
Separator between an instance root id and a template id in a remapped live id.
Object ids are opaque cookies (o<counter>-<rand>) and never contain /, so
/ is unambiguous as a structural separator.
On-disk format for project.taos.
Editable parameters of a PbrMaterial.
Editable core parameters of an OpenPbrMaterial (the common slabs).
Number of texture slots (tex0..tex3) the shader can sample.
Starter source for a new custom surface shader. Must define surface().
Max procedural flow vortices (matches the WGSL flowVortices array).
Max procedural flow segments (matches the WGSL flowSegments array).
Sized so a subdivided river spline can carry flow along its whole run.
Max sea-level offset regions (matches the WGSL seaLevelRegions array).
Max clip-surface regions (matches the WGSL clipRegions array).
Largest finite value representable in IEEE-754 half precision (fp16).
EVSM warp exponent for fp32 moment storage. Large enough to make the
Chebyshev bound tight (little light bleeding) while staying well within fp32
range — exp(2·40) is ~1.4e34, far below the fp32 max ~3.4e38.
EVSM warp exponent for fp16 moment storage. Capped so the warped second
moment exp(2c) stays inside FP16_MAX: exp(2·5.5) ≈ 59874 < 65504.
This is a weak warp — fp16 EVSM is markedly less effective than fp32 — so
prefer plain VSM + bleed reduction when only fp16 is available.
Samples 3D classic Perlin gradient noise (stb_perlin port).
Same as perlinNoise3 but with an explicit seed (low 8 bits used) to decorrelate octaves or produce independent noise fields.
Ridged multifractal noise: (offset - |perlin|)^2 summed over octaves with multiplicative
carry-over from the previous octave. Useful for sharp mountain ridges.
Fractional Brownian motion: sums signed Perlin noise across multiple octaves.
Turbulence noise: like fBM but sums the absolute value of each octave, producing the classic billowy "clouds" look.
Perlin noise variant that supports arbitrary (non-power-of-two) tiling periods up to 256.
Halton low-discrepancy sequence. Returns the index-th element of the
sequence in base base, in the half-open interval [0, 1).
Hann (raised-cosine) windowing factor for SH band l, parameterized by a
window width w (Sloan, "Stupid Spherical Harmonics Tricks"). Multiplying
each stored coefficient by shBandWindow(band, w) at bake time attenuates the
higher bands, suppressing the low-order "negative-lobe" ringing (dark halos) a
single very bright texel (the sun) produces in order-3 reconstruction.
Evaluates the 9 real SH basis functions Y_i(n) for a unit direction.
Returns K_i · poly_i(n) per coefficient (same ordering as K).
Projects an environment onto order-3 SH on the CPU using a deterministic Fibonacci-sphere sample set (uniform over the sphere, solid-angle weight 4π/N per sample). This is the reference/offline projector; the engine bakes the same integral on the GPU.
Reconstructs cosine-convolved diffuse irradiance E(n)/π for a unit direction from the 9 projected coefficients. Drop-in for an irradiance-cube sample (both store E/π).
Packs the 27-float (9 × RGB) coefficients into the std140 layout the SH
shader buffer expects: 9 × vec4
Build an OpenPbrMaterial that reproduces pbr's shading as closely as
the OpenPBR Surface model allows.
Convert a temperature/tint pair (each ~-100..100) into a per-channel LMS
scaling vector that the shader multiplies the scene's LMS by. Returns
[1,1,1] at the neutral (0,0) point.
Isotropic point light: candela from total luminous flux. cd = lm / 4π.
Spotlight: candela from luminous flux spread over the cone.
cd = lm / (2π · (1 − cos θ)), θ = the outer-cone half-angle in radians.
A narrower cone concentrates the same flux into more candela.
Exposure value at ISO 100 from camera settings:
EV100 = log2( N² / t · 100 / ISO )
where N is the aperture f-number, t the shutter time in seconds. A higher
EV100 means a brighter scene (which needs a smaller exposure multiplier).
Linear exposure multiplier that maps scene luminance into the display range:
exposure = 1 / (1.2 · 2^(EV100 − compensation))
The 1.2 is the standard middle-gray / saturation-based reflected-light
calibration. compensation is in EV stops: +1 doubles the exposure (brighter).
Exposure multiplier directly from photographic settings (convenience).
Standard deferred pipeline: shadow → geometry → AO → sky → deferred lighting → (point/spot) → (transparent overlay, forward or forward+) → TAA → (DoF) → (bloom) → tonemap.
Tiled forward+ preset: optional sky → optional shadow → forward+ → (TAA) → (DoF) → (bloom) → tonemap.
Minimal preset for forward-lit PBR rendering: optional sky → optional shadow → forward-lit → (TAA) → (DoF) → (bloom) → tonemap.
Registers the feature implied by sky (or nothing for 'none' / undefined).
Centralized so the three presets stay in sync.
Dense ocean spectrum à la Crest's ShapeGerstnerBatched — instead of one
sinusoid per octave, generate componentsPerOctave (~8) components per
octave with stratified-random wavelengths, Pierson–Moskowitz amplitudes,
directions spread around the wind, and random phases. The many components
interfere into irregular, detailed chop rather than smooth rolling swell.
Components are summed across the LOD cascade (each routed to its band).
Evaluate the Gerstner-spectrum surface height + normal at world (x, z)
at time t. Mirrors the per-wave evalGerstner from the WGSL helpers,
summed across the spectrum.
Pack fog volumes into the std430 layout the inject shader reads. Writes at most MAX_FOG_VOLUMES; returns the count written. Pure — exported for tests.
Transforms a local bounding sphere by m and writes the world sphere
(center.xyz, radius) into out[off..off+3]. The radius is scaled by the
largest of the matrix's basis-column lengths — the same conservative estimate
as Engine._sphereInCameraFrustum, so GPU and CPU culling agree.
Fills one drawIndexedIndirect argument set into out[off..off+4] (u32 units):
[indexCount, instanceCount, firstIndex, baseVertex, firstInstance]. The cull
compute pass later zeroes instanceCount for culled instances.
Generates and uploads the cloud base and detail 3D noise textures.
Loads the baked shape + erosion noise volumes and returns them in the
CloudNoiseTextures shape (baseNoise = 128³ shape, detailNoise = 32³
erosion). Caller owns the textures and must destroy().
Builds the continuous-LOD cluster DAG.
Serialize a packed cluster mesh to a self-describing ArrayBuffer.
Decode a baked cluster asset to a flat PackedClusterData, dispatching on the format version: v2 → as-is, v3 (paged) → loaded and flattened (so the v2 renderer consumes it unchanged).
Deserialize a packed cluster mesh (typed-array views alias buf).
Fetch a baked cluster mesh, transparently preferring a gzip-compressed sibling.
Quantize a built cluster mesh into its compact PackedClusterData form.
Pure (no GPUDevice); the inverse of the decode in cluster_vertex.wgsl.
Partition a packed cluster mesh into pages. Pure (no GPUDevice).
Rebuild an equivalent flat PackedClusterData from pages (clusters in the paged/reordered order, boundary vertices duplicated per page). Lets the existing v2 renderer consume a v3 asset unchanged. Pure.
Byte length of the metadata region (header + always-resident block + TOC) — i.e. the offset of the first page payload.
Serialize a paged cluster mesh to a self-describing ArrayBuffer.
Parse the metadata region (no page geometry). buf need only contain the
first PagedMeta.metaBytes bytes.
Slice a page's geometry from buf, whose byte base corresponds to the page's
toc.byteOffset (base = toc.byteOffset for the whole file, or 0 for a Range
fetch of just this page).
Deserialize a paged cluster mesh (typed-array views alias buf).
Concatenate every page into the resident pool layout and compute the pageBase
table (all pages resident, sequential). Pure (no GPUDevice).
Builds clusters (meshlets) from an interleaved vertex array + triangle indices.
Parse .cube text into a CubeLut. Supports comments (#), TITLE,
LUT_3D_SIZE, DOMAIN_MIN/DOMAIN_MAX, and the N³ float triplets. Throws on
1D LUTs (unsupported) or a body whose row count doesn't match the declared
size.
Upload a parsed LUT as a filterable rgba8unorm 3D texture (one texel per
cube entry, red = X fastest, which matches the .cube row order). Values are
clamped to [0,1]. Caller owns the texture and must destroy() it.
A 2×2×2 identity LUT (output = input). Bound by default so the tonemap pass always has a valid 3D texture even when no user LUT is set; the grade shader gates actual sampling behind the LUT-enable flag.
Fetch a .cube file by URL and parse it.
Fetches and decodes a Radiance .hdr URL into an rgba16float Texture.
Loads an HDR environment from a URL, dispatching on file extension: .exr
uses the OpenEXR loader, anything else (.hdr) the Radiance loader. Both
produce an identical rgba16float 2D Texture with a full mip pyramid, so the
result drops straight into IBL prefilter / sky panorama paths.
Parses an OpenEXR (.exr) file into linear floating-point RGBA pixels.
Uploads parsed EXR pixels as an rgba16float 2D texture with a full mip
pyramid — the same texture shape createHdrTexture produces, so EXR and
Radiance HDR environments are interchangeable downstream (IBL prefilter,
sky panorama, etc.).
Reshape a TALL EXR — a vertical stack of sliceHeight-row slices (e.g. a Godot
lightmap atlas exported as 512 × 512·N) — into an rgba16float 2D ARRAY texture
of N layers. The tall 2D form would exceed maxTextureDimension2D (8192); the
stacked scanline data maps 1:1 onto the array layers via rowsPerImage.
Convenience: fetch and decode an .exr URL into an rgba16float Texture.
Parses a Radiance HDR (.hdr) file into raw RGBE pixel data.
Uploads raw RGBE pixels and decodes them to an rgba16float 2D texture.
Parse IESNA LM-63 text into an IesProfile. Pure — no I/O. Tolerant of
the values being wrapped across lines (the spec allows it): after the
TILT=NONE line the rest of the file is treated as one whitespace-separated
number stream and consumed positionally.
Bake an axially-symmetric LUT row from a profile: width samples of the
normalized intensity over the vertical angle 0..180°. Horizontal angles are
collapsed by averaging (exact for symmetric profiles, numH === 1). Vertical
angles outside the profile's measured range read 0 (the luminaire emits
nothing there — e.g. a downlight above 90°). The peak is normalized to 1.0;
absolute brightness stays the light's own intensity. Pure — exported for tests.
Resolves the initialized TinyUSDZ WASM module, fetching and compiling it on
first call and memoizing thereafter. The Emscripten glue (tinyusdz.js) is a
real ES module exporting a MODULARIZE factory; we import it via its Vite URL
(keeps it out of the main bundle) and hand it the .wasm bytes explicitly as
wasmBinary so the module never has to locate/fetch the binary itself.
Loads a .usdz / .usda / .usdc asset from url into a static model
shaped like GltfStaticModel. Fetches the bytes, parses them through
the TinyUSDZ WASM runtime (lazily initialized on first call), and maps the
flattened render scene onto engine meshes / materials / nodes.
Builds the six view-projection matrices used to render a cube capture
centered at position. Mirrors PointLight.cubeFaceViewProjs but
with a longer default far plane (probes view the full scene).
Defer creating a GamepadController until a gamepad actually connects
(the first 'gamepadconnected' event, which the browser only fires once the
user has pressed a button on the pad). Returns a handle whose controller
field is filled once init runs (or stays null on a session that never sees
a pad). cancel() aborts a still-pending init.
Defer creating a TouchControls until the device actually produces a
touch event. The first touchstart anywhere on the page bootstraps the
overlay; subsequent touches drive it. Returns a handle whose controls
field is filled once init runs (or stays null on a desktop session that
never sees a touch). cancel() aborts a still-pending init.
Convenience wrapper that wires a TouchControls to a free-fly CameraController: bottom-left joystick → forward/strafe, canvas drag (right half) → look, optional UP/DOWN buttons → vertical input.
Parses a KHR_animation_pointer JSON pointer into a structured target.
Build a .bundle archive from inputs.
Serialize the 32-byte footer that terminates every bundle.
Parse and validate the 32-byte footer. bytes must be exactly the trailing
BUNDLE_FOOTER_SIZE bytes of the archive.
Build a profile from a live GPUDevice. A device that exposes ASTC/ETC2
but not BC is treated as 'mobile'; otherwise 'desktop'. Callers can always
override with BundleManager.setProfile (e.g. to force the mobile build
on a development desktop).
Build every group into a .bundle and assemble the catalog (dependency graph,
asset→bundle map, label index).
Compress data with method. 'none' returns the input unchanged.
Decompress data previously stored with method. 'none' is a passthrough.
Evaluates a transition condition over the current parameters.
Builds the live blend graph for an AnimatorDoc against a loaded model.
Returns the root node, the parameter bag (set these from gameplay), and an
apply() that pushes parameters into the graph each frame. When the doc has no
root, a single rest-pose node is returned.
Sample every track at time t (seconds). Values are held before the first key
and after the last; between keys, LINEAR for vectors and slerp for rotation.
Insert (or replace) a keyframe at time with value (length = componentCount),
keeping the track's times sorted. Returns the new key's index.
Remove the keyframe at index from a track.
Samples clip at time into out, seeding any joint the clip doesn't
animate with the rest pose (so partial clips compose correctly). skinIndex
selects which skin's joints to read.
Blends two poses: out = mix(a, b, w) — lerp on translation/scale, slerp on
rotation. w = 0 → a, w = 1 → b. out may alias a or b.
Blends N poses by weight into out via incremental normalized nlerp:
translation/scale become the weighted average, rotation the running slerp. The
weights need not sum to 1 (they're normalized as they're folded in); all-zero
weights leave out equal to the first pose. out must not alias any input.
Layers an additive pose on top of a base: out = base + weight·(add − ref),
the operation behind aim-offset / lean layers. The additive contribution is
measured relative to a reference pose ref (usually the additive clip's
neutral frame): rotation is the delta add·ref⁻¹ applied multiplicatively and
scaled by weight; translation is the linear offset; scale is multiplicative.
out may alias base.
Find a generated-circuit component on go by its circuit name (the
Read an exposed variable from a circuit component by name. Returns any so the
value flows into typed inputs without a cast; undefined when comp is null or
has no such field.
Write an exposed variable on a circuit component by name. No-op when comp is null.
Generate a fresh, process-unique object id. Used as the default identity for any GameObject / Component created without an explicit id.
The live id for a template node inside an assembly instance. The assembly root
maps to the instance's own id (instanceRootId); every other template id is
namespaced under it. Deterministic — derivable at load from the persisted
instance id + the persisted template ids, with nothing extra stored.
Deep-clone a template and apply overrides, returning a patched template (ids unchanged).
Remap a (patched) template tree to an instance: the root takes
instanceRootId, every other object/component id is namespaced under it via
liveIdForTemplate. Nested assembly-link nodes keep their link (their
inner subtree is materialized separately by the instantiator).
Convenience: applyOverrides then remapTree.
Register (or clear with null) the host's assembly spawner. Last wins.
Spawn the assembly guid via the registered spawner, or null + a warning if none.
Register (or override) the factory for a component doc type. Last wins.
The factory for a doc type, or null if none is registered.
Build a component from its doc via the registry, or null if unbuildable.
Materialize a loaded assembly into a live GameObject: apply the instance's override delta and placement options, remap ids to a fresh instance, and build. Assembly-link nodes are not resolved — use instantiateAssemblyAsync for assemblies that reference other assemblies.
Build every root object of a scene doc. Caller adds them to a Scene.
Like instantiateAssembly, but resolves nested assembly links recursively.
Like instantiateScene, but resolves scene-node and nested assembly links.
Build a live MeshRenderer from its doc (registered as the MeshRenderer factory).
Build a built-in primitive mesh from a non-glTF MeshRef. Pass
retain to keep the CPU vertex/index arrays on the mesh (e.g. so the editor
can gather triangles for a navmesh bake); off by default to save memory.
Build an inline PBR material. (Material-asset references go through the resolver.)
Pure geometry for a Y-up cylinder centered at the origin: caps at y = ±height/2,
smooth side (per-segment normals) and flat caps. Interleaved 12-float vertex
stride (position3 + normal3 + uv2 + tangent4) matching Taos's vertex layout.
Mesh has no createCylinder, so the engine provides this for assembly/scene
primitives; factored out (device-free) so it's unit-testable.
The type key a connection's targetType matches against. The doc type for
built-ins; Script/Circuit components append their asset guid so two different
scripts on one object stay distinguishable (two instances of the same
script still resolve to the first).
Record an instantiated object so connections can target it by id.
Record a built component's doc type, and queue its connections if any.
Resolve and connect every pending connection. Unresolvable rows (missing
target object / component / method, or a signal name that isn't a
Signal property) warn and are skipped — an authored connection going
stale must not break scene load.
Wire a single connection from a live source component (used by the editor when rewiring after an inspector edit, without a full re-instantiate). Returns the unsubscribe function, or null (with a warning) when unresolvable.
Apply a value map onto a PbrMaterial (unset values use the schema default).
Read a PbrMaterial's current fields back into a value map.
Apply a value map onto an OpenPbrMaterial.
Read an OpenPbrMaterial's current core fields back into a value map.
The fixed parameter schema for a built-in shader kind (empty for wgsl/graph, whose parameters come from the shader asset itself).
WGSL for the material uniform: a @group(2) @binding(0) struct with a built-in
sg_time plus each parameter. Every field is @align(16) so the CPU can pack
each into its own 16-byte slot (index i → byte offset i·16) — trivially valid
for the uniform address space, no std140 packing puzzles.
Uniform buffer size (bytes) for a param set: (1 built-in + n params) × 16.
Pack time + each parameter value into the 16-byte-per-slot uniform layout.
Splice user WGSL + the params uniform into the deferred (opaque) template.
Splice user WGSL + the params uniform into the forward (transparent) template.
0-based line index in the assembled shader where the user's first source line
lands. A WGSL compiler reports diagnostics against the assembled shader; the
editor subtracts this offset to map a message back to the user's .wgsl line
(userLine1Based = assembledLine1Based − offset). Pure + stable per template.
Small stable FNV-1a string hash → base36, for a per-source pipeline-cache key. Identical WGSL ⇒ identical id ⇒ the pass reuses one cached pipeline.
The WGSL value type a parameter maps to (color→vec3, bool→f32).
The output ports of a node kind (synthesizes the default single out).
Coerce a WGSL expression of type from to type to (splat/truncate/pad).
Format a JS number as a WGSL f32 literal (always with a decimal point).
Compile a ShaderGraph to a WGSL surface() function. Pure and
deterministic. Unconnected Output ports keep their default_surface() value;
cycles and unknown nodes are reported in errors and skipped.
A minimal starter graph: a Color into Base Color.
Catmull-Rom-subdivide a spline's center-line into ~step-meter points
(always includes the authored endpoints).
Evaluate a spline into chained sea-level segment strips. baseLevel is
the ocean's base level — authored ABSOLUTE surface heights become
offsets above it.
Derive flow segments along a spline: the subdivided points are grouped into equal-arc-length runs (one per available slot) and each run becomes a straight flow chord whose speed scales with its slope — gentle drift on the flats, fast water down the cascade steps. The spline is authored source → mouth, so every chord already points downstream.
Picks a warp exponent whose second moment exp(2c) fits the given moment
texture format. Returns the fp32 exponent for 32-bit-float formats and the
fp16-safe exponent otherwise.
True when both warped moments at depth 1.0 fit a fp16 moment texture.
VSM light-bleed reduction: remap the Chebyshev probability so everything below
amount clamps to fully shadowed. The over-estimate that washes out the
overlap band between separated occluders lives in the low tail of [0,1], so
cutting it removes the bleed at a small cost in penumbra darkness. amount of
0 disables it.
One-tailed Chebyshev upper bound on the lit fraction. m0/m1 are E[x] and
E[x²] in the map's space (linear depth for VSM, warped depth for EVSM);
compare is the receiver in the same space. minVariance floors the variance
to suppress acne; bleed drives vsmReduceBleed.
EVSM positive exponential warp exp(c·depth).
EVSM2 (positive-only) shadow test. m0/m1 must have been baked as
(E[w], E[w²]) with w = evsmWarp(d, c) for the SAME c. minVariance is in
linear-depth units and scaled into warp space via the warp derivative
d/dd exp(c·d) = c·w so the floor behaves consistently across the range.
Core engine: the math primitives, the GameObject / Component / Scene model and per-frame driver, the WebGPU renderer (materials, lights, render features, presets, passes, and the render graph), and asset loading. This is everything in
import … from 'taos/index.js'; the standalone subsystems (audio, particles, splats, text, xr, block, sdf, terrain, geo, physics) have their own modules.