ANARI scene graph and ray tracing
The ANARI module turns geometry, materials, lights, cameras, and transforms into a retained 3D composition. It keeps the world description separate from the renderer so that loaded assets and program-built scenes can use forward, deferred, or ray-traced paths. The scene and rendering path is now owned by the ANARI module rather than the former scene package. See the data and visualization assets overview for the wider asset flow, data interchange formats, glTF rendering features, text rendering, Gaussian splats, and Three integration for related paths.
Scene graph model
The repository uses two related scene models. The engine scene graph represents nested nodes and transforms, while the ANARI module exposes a retained object model that composes surfaces into groups, placements, and worlds.
Node hierarchy
The engine scene graph organizes renderable content as nodes. A group owns child nodes and supplies the hierarchy for visibility, traversal, transform composition, bounds, and optional depth ordering. A model node connects a renderable model to that hierarchy, while materials remain reusable data rather than parent or child nodes. (See modules/…/group-node.ts• L34-171, modules/…/model-node.ts• L16-70.)
Each node has a local transform and display state. Traversal combines transforms from the root to a leaf, so a group change can move all descendants without changing their local data. Bounds use the same hierarchy and give callers a world-space extent for framing or ordering. (See modules/…/scenegraph-node.ts• L26-169, modules/…/scenegraph-bounds.ts• L8-47.)
References: modules/…/scenegraph-node.ts• L26-169 modules/…/group-node.ts• L34-171 modules/…/model-node.ts• L16-70
Scene graph adaptation
The ANARI renderer accepts a GroupNode root as an alternative to an already normalized surface list. ScenegraphSurfaces walks visible SceneMeshNode leaves, combines their hierarchy transforms, and groups compatible leaves into reusable surfaces. This keeps scene-graph ownership with the ANARI renderer while preserving node identity for picking and other inspection work. (See modules/…/scene-renderer.ts• L193-196, modules/…/scene-renderer.ts• L361-382, modules/…/scenegraph-surfaces.ts• L20-126.)
SceneMeshNode is the declarative render leaf for this path. Groups and other metadata nodes provide structure, visibility, and transforms. A renderable leaf must use the ANARI scene-mesh contract rather than an unrelated engine model node. (See modules/…/scene-mesh-node.ts• L8-27, modules/…/scenegraph-surfaces.ts• L114-121.)
References: modules/…/scene-renderer.ts• L193-196 modules/…/scene-renderer.ts• L361-382 modules/…/scenegraph-surfaces.ts• L20-126 modules/…/scene-mesh-node.ts• L8-27
Retained composition
The ANARI module describes a world with reusable objects instead of requiring applications to build engine nodes directly. A surface binds geometry to a material. A group collects surfaces and lights. An instance places one or more groups with a transform. A world collects direct surfaces, instances, and lights for one rendered composition. A frame binds that world to a camera and renderer. (See modules/…/anari-scene-adapter.ts• L489-527, modules/…/anari-types.ts• L197-222.)
The same surface can appear in many placements. This keeps one logical renderable resource while allowing many transforms, so composition expresses reuse and rendering can keep the work instanced. The world is the boundary at which these relationships become a complete scene for a frame.
The main composition relationship is shown below.
flowchart TD
Geometry --> Surface
Material --> Surface
Surface --> Group
Light --> Group
Group --> Instance
Instance --> World
Surface --> World
Light --> World
World --> Frame
Frame --> Renderer
References: modules/…/anari-scene-adapter.ts• L489-527 modules/…/anari-scene-adapter.ts• L796-885 modules/…/anari-types.ts• L197-222
Composition responsibilities
Composition defines what exists in the world and where it appears. It does not draw geometry itself. The scene adapter resolves retained object relationships into the common scene description expected by the rendering system.
Geometry and material roles
Geometry supplies the shape and vertex data for a surface. Materials supply appearance rules and image resources. A surface joins these roles and gives the renderer a stable identity for reuse and batching. (See modules/…/anari-scene-adapter.ts• L489-527, modules/…/anari-scene-adapter.ts• L629-785.)
The adapter converts supported geometry and material descriptions into shared engine resources. It supports triangle data and built-in mesh shapes such as spheres, toruses, rings, prisms, and quads. It keeps material changes separate from geometry changes where possible, so an appearance update does not imply that the whole scene topology changed. ANARI reuses the shared engine PBR material boundary and adds scene-specific model behavior for transforms, picking, shadows, and depth paths. (See modules/…/anari-scene-adapter.ts• L542-547, modules/…/anari-scene-adapter.ts• L629-785, modules/…/pbr-material.ts• L4-13, modules/…/pbr-model.ts• L13-95.)
References: modules/…/anari-scene-adapter.ts• L489-527 modules/…/anari-scene-adapter.ts• L542-547 modules/…/anari-scene-adapter.ts• L629-785 modules/…/pbr-material.ts• L4-13 modules/…/pbr-model.ts• L13-95
Transforms and bounds
Transforms control placement without duplicating the underlying surface. Direct world surfaces use an identity placement, while instances carry their own matrices. The adapter collects these placements into one surface description with aligned transforms and placement identities. (See modules/…/anari-scene-adapter.ts• L489-565, modules/…/anari-scene-adapter.ts• L796-885.)
Bounds describe the spatial extent of content after local and instance transforms. Loaded assets also expose normalized bounds, centers, sizes, and suggested orbit distances so a viewer can frame an asset without knowing its scale in advance. (See modules/…/group-node.ts• L51-62, modules/…/create-scenegraph-from-gltf.ts• L22-33, modules/…/create-scenegraph-from-gltf.ts• L134-136.)
References: modules/…/anari-scene-adapter.ts• L489-565 modules/…/anari-scene-adapter.ts• L796-885 modules/…/group-node.ts• L51-62 modules/…/create-scenegraph-from-gltf.ts• L22-33
Committed scene state
Retained object changes become part of the renderable scene only after the object commits its parameters. The adapter uses scene revisions to distinguish topology, transform, material, and light changes. This lets the renderer refresh the affected part of the composition while keeping the world identity stable. (See modules/…/anari-scene-adapter.ts• L385-487, modules/…/scene-renderer.ts• L109-129.)
The distinction matters during animation. Moving an instance changes placement data. Replacing geometry or changing surface membership changes topology. The renderer can update instance transforms without rebuilding the complete surface set, but a topology change needs a wider scene refresh. The device keeps a bounded change history so the adapter can detect when it must rebuild instead of applying a partial update. (See modules/…/anari-scene-adapter.ts• L385-487.)
References: modules/…/anari-scene-adapter.ts• L385-487 modules/…/scene-renderer.ts• L109-129
Scene description validation
The ANARI module defines an editable JSON description for the retained model. Its schema checks value ranges and links between named geometries, materials, textures, surfaces, groups, instances, lights, cameras, and animation data before the description enters the runtime. It also publishes a JSON Schema for tools that edit or inspect scene files. (See modules/…/schemas.ts• L467-757.)
Renderer settings stay part of the scene description but remain tied to the selected renderer type. Forward and deferred scenes use presentation controls, while ray-traced scenes may add sampling, history, bounce, transport, emitter, shadow, scale, and diagnostic controls. Shared presentation choices such as tone mapping and output color space remain portable across renderer types. (See modules/…/schemas.ts• L318-361, modules/…/schemas.ts• L502-757, modules/…/anari-types.ts• L246-295.)
References: modules/…/schemas.ts• L318-361 modules/…/schemas.ts• L502-757 modules/…/anari-types.ts• L246-295
Asset loading relationship
Asset loading creates or fills the scene representation. It does not replace the scene graph's composition role. A loader interprets an interchange format, creates scene resources and relationships, and returns a composition that the application can inspect, animate, frame, export, or render.
glTF scene conversion
The glTF path converts source scenes into retained ANARI geometry, materials, textures, lights, nodes, instances, and animation clips. It preserves meshless parents and stable source identities, so node tracks can continue to control the same hierarchy after import. (See modules/…/gltf-import.node.spec.ts• L101-129, modules/…/anari-animation.node.spec.ts• L43-108.)
The adapter also keeps glTF-specific loading outside the ANARI root entry point. Applications that need glTF use the optional @luma.gl/anari/gltf entry point, while the retained-object core stays usable without that integration. (See modules/…/package.json• L18-52, modules/…/anari-animation.node.spec.ts• L19-40.)
Imported materials keep their authored physical properties, texture coordinate choices, sampler behavior, and animation pointer targets. The result remains editable retained JSON rather than a renderer-only copy of the source asset. (See modules/…/gltf-import.node.spec.ts• L191-253, modules/…/gltf-import.node.spec.ts• L255-475.)
References: modules/…/gltf-import.node.spec.ts• L13-41 modules/…/gltf-import.node.spec.ts• L101-129 modules/…/gltf.ts• L121-193 modules/…/gltf.ts• L195-209 modules/…/anari-animation.node.spec.ts• L19-108 modules/…/package.json• L18-52
OpenUSD stage composition
The OpenUSD path first composes a stage from root layers, references, variants, and local opinions. It then maps the composed stage to retained ANARI surfaces, materials, textures, instances, lights, and a normalized presentation root. This keeps USD composition rules at the loading boundary. (See modules/…/usd-loader.node.spec.ts• L44-114, modules/…/usd-loader.node.spec.ts• L168-242.)
Shared USD geometry stays shared when the source uses point instancers or repeated assemblies. Material bindings and texture paths follow the composed layer that owns them, while source lights can follow visible emitter geometry in the resulting scene. Unsupported binary USDC input is reported instead of being treated as ASCII. (See modules/…/usd-loader.node.spec.ts• L116-166, modules/…/usd-loader.node.spec.ts• L244-293.)
References: modules/…/usd-loader.node.spec.ts• L9-41 modules/…/usd-loader.node.spec.ts• L44-114 modules/…/usd-loader.node.spec.ts• L168-242 modules/…/usd-loader.node.spec.ts• L244-293
Scene interchange
The retained ANARI description can be exported to glTF so that scene hierarchy, morph targets, skins, material animation pointers, colors, tangents, joints, weights, and opacity can cross the format boundary. A binary export can be parsed again as glTF without losing the main scene relationships. (See modules/…/scene-interchange.node.spec.ts• L13-46, modules/…/scene-interchange.node.spec.ts• L48-119.)
Interchange is therefore a round-trip contract rather than a one-way import feature. The retained model remains the working scene, while glTF acts as a portable representation for assets and animation data.
References: modules/…/scene-interchange.node.spec.ts• L13-46 modules/…/scene-interchange.node.spec.ts• L48-119
Rendering relationship
Rendering consumes a normalized scene description. The scene adapter maps the retained world into surfaces, transforms, materials, lights, and camera state. Renderer runtimes then send that shared description to forward, deferred, diagnostic, or ray-tracing backends.
The package boundary keeps this opinionated scene and rendering layer in ANARI while the stable engine provides format-neutral scene and environment building blocks. ANARI re-exports the shared PBR material, clustered-light, and shadow contracts from the engine and keeps its scene-specific model and renderer entry points in the ANARI package. (See modules/…/pbr-material.ts• L4-13, modules/…/clustered-lighting.ts• L5-24, modules/…/shadow-map-renderer.ts• L5-22, modules/…/renderers.ts• L5-51.) The ANARI environment service adapts generated prefiltered lighting resources to scene settings, keeps intensity and rotation with the scene, and selects a lower-range texture format when the device cannot filter and render the preferred HDR format. (See modules/…/pbr-environment.ts• L14-79, modules/…/scene-renderer.node.spec.ts• L55-91.)
Scene render contract
The renderer input is a list of reusable surfaces with geometry, material, and one or more world transforms. It also includes camera state, lights, optional environment data, and revision information. This contract lets raster and ray-tracing renderers use the same composition without depending on the source format. A scene-graph root follows the same contract after the renderer adapts its visible mesh leaves into those surfaces. (See modules/…/scene-renderer.ts• L42-157, modules/…/scene-renderer.ts• L193-196, modules/…/scene-renderer.ts• L361-372, modules/…/scenegraph-surfaces.ts• L35-126, modules/…/anari-scene-adapter.ts• L300-340.)
The normal frame path is a short boundary-crossing flow.
sequenceDiagram
participant App as Application
participant World as Retained world
participant Adapter as Scene adapter
participant Runtime as Renderer runtime
participant Renderer as Shared renderer
participant GPU as Graphics device
App->>World: Commit composition changes
App->>Runtime: Render frame
Runtime->>Adapter: Request scene description
Adapter-->>Runtime: Surfaces, transforms, lights, camera
Runtime->>Renderer: Render normalized scene
Renderer->>GPU: Prepare cached resources
Renderer->>GPU: Draw or trace scene
GPU-->>App: Frame statistics
References: modules/…/anari-rendering-runtime.ts• L52-162 modules/…/anari-scene-adapter.ts• L300-340 modules/…/scene-renderer.ts• L253-312 modules/…/scenegraph-surfaces.ts• L35-126
Render-time reuse
The shared scene renderer keeps compiled resources by frame and surface identity. It updates instance transforms and material inputs for an existing surface when possible. It rebuilds a surface when its geometry, structural rendering choices, or texture bindings no longer match the cached resource. (See modules/…/scene-renderer.ts• L339-389, modules/…/scene-renderer.ts• L440-555.)
Surface ordering is a rendering concern rather than a change to the scene graph. Opaque surfaces can remain in their prepared order, while blended surfaces are ordered by camera depth. Transmissive surfaces can use an opaque capture before the final pass. Composition can therefore describe object identity and placement without encoding a renderer-specific draw order. (See modules/…/scene-renderer.ts• L271-312, modules/…/scene-renderer.ts• L398-408, modules/…/scene-renderer.ts• L557-621.)
References: modules/…/scene-renderer.ts• L339-389 modules/…/scene-renderer.ts• L398-408 modules/…/scene-renderer.ts• L440-621
Raster and transparency support
The ANARI rendering layer supplies forward and deferred lighting, image-based environment support, shadows, and order-independent transparency. These services let raster paths use the same retained surfaces and lights while keeping lighting and visibility work separate from scene composition. The renderer entry points expose these scene, deferred, ray-tracing, shadow, and transparency services from the ANARI module after the move from the former scene package. Shared engine lighting and shadow resources are re-exported through this boundary. Shadow maps render depth views for directional, spot, and point lights, then return the data needed by scene shaders. (See modules/…/renderers.ts• L17-138, modules/…/clustered-lighting.ts• L5-24, modules/…/shadow-map-renderer.ts• L5-22, modules/…/shadow.ts• L5.)
Environment preparation follows the same boundary. ANARI keeps the scene-facing environment contract while the engine-owned generator creates the filtered resources used for diffuse and specular image-based lighting. One-shot preparation preserves the older ownership behavior, and the prepared environment releases generated resources without destroying the caller's source texture. (See modules/…/pbr-environment.ts• L22-79, modules/…/scene-renderer.node.spec.ts• L907-986.)
Deferred rendering stores compatible surface data in a G-buffer and resolves ambient, directional, and point-light contributions later. Scenes with unsupported material features or light combinations use the shared forward renderer instead. Shadow modules support directional cascades, spot lights, and point lights, while contact shadows add local screen-space detail. (See modules/…/deferred-scene-renderer.ts• L32-191, modules/…/deferred-lighting.ts• L49-80, modules/…/deferred-ambient-lighting.ts• L20-83, modules/…/clustered-lighting.ts• L48-348, modules/…/shadow.ts• L5, modules/…/contact-shadow.ts• L5-13.)
The A-buffer stores translucent fragments per pixel and resolves them in depth order. Weighted blended transparency stores weighted color and revealage, then composites both over the current color. Both strategies keep transparency state in the rendering path instead of the retained scene model. WBOITRenderer records opaque depth plus accumulation and revealage passes, then resolves them over a sampleable opaque color texture when the device supports blendable rgba16float targets. (See modules/…/a-buffer.ts• L159-201, modules/…/a-buffer-resolve-composite-shader-pass.ts• L160-166, modules/…/wboit-renderer.ts• L85-181, modules/…/wboit-renderer.ts• L235-248.)
References: modules/…/deferred-scene-renderer.ts• L32-191 modules/…/deferred-lighting.ts• L49-80 modules/…/deferred-ambient-lighting.ts• L20-83 modules/…/clustered-lighting.ts• L48-348 modules/…/shadow-map-renderer.ts• L5-22 modules/…/shadow.ts• L5 modules/…/contact-shadow.ts• L5-13 modules/…/a-buffer.ts• L159-201 modules/…/a-buffer-resolve-composite-shader-pass.ts• L160-166 modules/…/wboit-renderer.ts• L85-181 modules/…/wboit-renderer.ts• L235-248
Specialized data rendering
The ANARI rendering layer also supports data that is not a triangle surface. The structured volume renderer ray-marches regular scalar and vector fields on WebGPU. Scalar transfer functions and vector glyph settings turn sampled field data into visible volume output. Spectral caustics add traced D65 XYZ light energy to a planar receiver before conversion to linear sRGB. (See modules/…/structured-volume-renderer.ts• L24-95, modules/…/structured-volume-renderer.ts• L108-209, modules/…/spectral-caustics.ts• L16-47, modules/…/spectral-caustics.ts• L130-136.)
These paths keep their own data contracts and join rendering at runtime. They do not force volume samples or caustic maps into retained surface geometry.
References: modules/…/structured-volume-renderer.ts• L24-95 modules/…/structured-volume-renderer.ts• L108-209 modules/…/spectral-caustics.ts• L16-47 modules/…/spectral-caustics.ts• L130-136
Ray-tracing runtime
The ray-tracing runtime adapts the retained world to a shared WebGPU software ray-tracing renderer. It supplies normalized surfaces, placements, lights, analytic primitive data, and material texture bindings, then passes camera projection and quality controls such as samples, history, denoising, debug views, bounces, emitter sampling, shadows, fog, and adaptive resolution. The rendering runtime selects this path for ray-traced frames while the shared scene adapter remains the source of scene data. (See modules/…/ray-tracing-scene-renderer.ts• L464-545, modules/…/ray-tracing-scene-renderer.ts• L711-725, modules/…/ray-tracing-scene-renderer.ts• L727-1180, modules/…/anari-rendering-runtime.ts• L52-162.)
The ray-tracing renderer builds acceleration data for scene intersections. Topology changes rebuild the structure. Transform-only changes can update primitive data and refit the structure when the existing layout remains valid. This keeps animation updates smaller than a full scene rebuild. (See modules/…/ray-tracing-scene-renderer.ts• L761-992.)
Material maps are borrowed from the retained scene. The runtime assigns each distinct base-color, emissive, metallic-roughness, and transmission texture to a shader binding and uses surface metadata to apply the right map, UV set, and UV transform at a hit. A map or sampler change can require a trace-graph rebuild, while material content changes reset accumulated history. (See modules/…/ray-tracing-material-textures.ts• L8-95, modules/…/ray-tracing-scene-renderer.ts• L1043-1067, modules/…/ray-tracing-scene-shaders.ts• L735-749.)
Ray tracing keeps frame history as a rendering concern. Camera, scene, sampling, material, light, or quality changes can change the accumulated result. The runtime resets incompatible history and reports internal size, accumulated samples, memory, and command-graph stages through frame statistics. Progressive samples, temporal reprojection, and adaptive resolution trade image stability for interactive frame time. (See modules/…/ray-tracing-scene-renderer.ts• L998-1178, modules/…/ray-tracing-scene-shaders.ts• L903-1093, modules/…/anari-rendering-runtime.ts• L309-357.)
The ray-tracing renderer also connects rendered pixels back to retained scene objects. Picking resolves a display pixel to a surface or placement with world-space hit data. Channel capture exposes identifier, distance, normal, and projected-depth textures for tools such as labels and diagnostics. Placement identity keeps repeated surfaces distinguishable. (See modules/…/ray-tracing-scene-renderer.ts• L1183-1364.)
The ray-tracing flow is shown below.
sequenceDiagram
participant Frame as ANARI frame
participant Adapter as Scene adapter
participant Runtime as Ray tracing runtime
participant Ray as Ray-tracing renderer
participant GPU as WebGPU device
Frame->>Runtime: Submit world, camera, and renderer
Runtime->>Adapter: Normalize retained scene
Adapter-->>Runtime: Surfaces, primitives, placements, revisions
Runtime->>Ray: Render scene and quality settings
Ray->>GPU: Build or update acceleration data
Ray->>GPU: Trace rays and present image
Frame->>Runtime: Pick or capture channels
Runtime-->>Frame: Retained identity and hit data
References: modules/…/ray-tracing-scene-renderer.ts• L727-1180 modules/…/ray-tracing-scene-renderer.ts• L1183-1364 modules/…/ray-tracing-material-textures.ts• L23-95 modules/…/anari-scene-adapter.ts• L343-355 modules/…/renderers.ts• L17-45
Change checklist
When these files or sections are changed, remember to consider these:
- Changes to surface, group, instance, or world relationships must update placement collection and topology invalidation together.
- Changes to committed object categories must stay aligned with revision handling for topology, transforms, materials, and lights.
- Changes to surface identity or transform ordering must preserve the one-to-one relationship between transforms and placement identities used by renderer caches and ray-tracing inspection.
- Changes to geometry subtypes or shape limits must keep JSON validation, mesh conversion, analytic primitive data, and raster/ray behavior aligned.
- Changes to material texture slots or physical material controls must keep schema names, normalized bindings, ray texture slot limits, and ray transport behavior aligned.
- Changes to material map binding or UV metadata must keep the texture revision, shader case mapping, sampler bindings, and history reset behavior aligned.
- Changes to loaded scene ownership must preserve cleanup for models, materials, generated textures, animation helpers, and skins.
- Changes to bounds must keep local transforms, instance transforms, and viewer framing data in the same coordinate space.
- Changes to the ANARI package boundary must keep the root entry point independent from optional glTF loading and keep the
./gltfexport usable. - Changes to shared PBR, clustered-light, or shadow exports must preserve the ANARI-facing names while keeping their engine-owned contracts format-neutral.
- Changes to the scene package boundary must keep opinionated scene rendering and PBR factories out of the stable engine while preserving the ANARI-facing environment contract.
- Changes to glTF or USD adapters must preserve stable retained identities for hierarchy, material, texture, light, and instance animation targets.
- Changes to interchange mapping must keep retained scene features aligned with the corresponding glTF hierarchy, morph, skin, material, and animation fields.
- Changes to renderer subtype registration must keep subtype discovery, lazy runtime creation, frame dispatch, and runtime cleanup aligned.
- Changes to forward or deferred capability checks must keep shared material, environment, light, depth, and post-processing inputs aligned.
- Changes to transparency, shadow, clustered-lighting, volume, or caustic paths must preserve their shared scene and depth contracts.
- Changes to the shared scene, shadow-map callbacks, or shadow capacities must preserve the depth-view inputs used by scene preparation and the light limits used by shadow resources.
- Changes to ray-tracing quality controls must keep schema limits, retained renderer parameters, acceleration updates, accumulation reset rules, and frame statistics aligned.
- Changes to placement identifiers or captured channel formats must preserve the mapping from GPU hit data back to retained surfaces and instances.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Geometry or material is absent from a surface | The surface is not added to the render description. | Validate both references when composing a surface. |
| A ring or torus has invalid radius or sweep limits | Scene validation rejects the shape before composition. | Keep shape dimensions and sweeps within the schema limits. |
| Parameters are changed but not committed | The adapter continues to see the previous scene state. | Call commitParameters() before rendering the change. |
| A surface has no placements | The renderer skips it and produces no draw. | Keep at least one direct or instance placement for visible content. |
| A topology change is reported only as a transform change | Cached scene resources or ray-tracing geometry can describe stale membership. | Classify geometry and membership changes as topology revisions. |
| A reused surface is replaced with separate surface objects | Instancing and compiled-resource reuse are reduced. | Reuse one surface object when placements share geometry and material. |
| The optional glTF adapter is imported through the ANARI root | Core ANARI users gain an unwanted format dependency. | Use the isolated @luma.gl/anari/gltf entry point. |
| A referenced USD layer or variant cannot be resolved | The composed stage lacks source geometry or material opinions. | Resolve layer paths and selected variants before ANARI conversion. |
| Binary USDC input is passed to the ASCII USD parser | The input is rejected instead of being silently misread. | Detect and report unsupported USDC crates explicitly. |
| A deferred scene uses unsupported materials, environment textures, or light combinations | The scene uses forward rendering instead of deferred lighting. | Check deferred capability before relying on G-buffer output. |
| A deferred scene is rendered on a non-WebGPU device | Deferred renderer creation fails because this path requires WebGPU. | Select a WebGPU device before using deferred rendering. |
Weighted blended transparency lacks a renderable or blendable rgba16float target | WBOIT cannot be created or rendered. | Check getWBOITSupport() before selecting WBOIT. |
| A WBOIT source color texture is not sampleable | Transparency resolve cannot read the opaque source. | Pass a source texture with sample usage. |
| A scene-graph leaf is an unsupported engine model node | Scene adaptation throws instead of producing a surface. | Use SceneMeshNode for renderable leaves. |
| An environment source is not an equirectangular 2D texture | Environment preparation rejects the source instead of producing lighting resources. | Pass a valid equirectangular source texture to the ANARI environment service. |
| A ray-tracing frame is used before it has rendered | Picking and channel capture return no hit or snapshot. | Render and submit the frame before requesting inspection data. |
| A ray-tracing runtime is selected on a non-WebGPU device | Runtime creation fails because this path requires WebGPU. | Use a WebGPU device for the ray-tracing renderer. |
| A ray-tracing surface set uses more than fourteen distinct material textures | Material binding setup fails because the ray shader has a fixed texture budget. | Keep distinct ray material maps within the supported limit. |
| A ray material map or sampler changes without a trace-graph rebuild | The ray shader can sample stale texture bindings or surface map cases. | Recompute the material texture revision and rebuild the trace graph when it changes. |
| A ray-tracing bounce budget exceeds the supported limit | Extra requested bounces do not add transport work. | Treat the runtime budget as zero through eight bounces. |
| Ray quality or scene inputs change without the needed history reset | Progressive output can contain samples from incompatible settings. | Connect renderer and scene revisions to ray history invalidation. |
| A captured channel snapshot is destroyed before submitted GPU work completes | Later texture reads can fail or access released resources. | Submit all caller GPU use before destroying the snapshot. |
| A light count exceeds the configured shadow or deferred capacity | Lighting or shadow rendering rejects the frame or falls back. | Keep light counts within the selected renderer capacities. |
| A translucent fragment buffer reaches capacity | Some translucent fragments are dropped from the later resolve. | Size the A-buffer for the expected fragment load and monitor dropped counts. |
| A structured volume uses invalid dimensions, bounds, or source formats | Volume preparation fails. | Keep volume sources compatible with the WebGPU volume contract. |
Key files
| File | Why to read it |
|---|---|
| modules/…/anari-scene-adapter.ts | Maps retained worlds into shared surfaces, placements, materials, lights, analytic primitives, and revisions. |
| modules/…/anari-rendering-runtime.ts | Connects ANARI frames to shared forward or deferred renderers and post-processing. |
| modules/…/anari-types.ts | Defines composition objects, renderer controls, hit data, channels, and ray-tracing statistics. |
| modules/…/schemas.ts | Defines the editable scene contract and validates references, shapes, materials, and renderer controls. |
| modules/…/scene-renderer.ts | Defines the shared raster scene contract, resource reuse, instancing, material updates, transmission, and transparent ordering. |
| modules/…/scenegraph-surfaces.ts | Adapts a scene-graph root into grouped surfaces while retaining mesh-node identity and hierarchy transforms. |
| modules/…/scene-mesh-node.ts | Defines the renderable scene-graph leaf used by the ANARI adapter. |
| modules/…/pbr-environment.ts | Bridges engine-owned prefiltered environment resources to the ANARI scene contract and preserves format fallback and ownership behavior. |
| modules/…/scene-instances.ts | Defines the shared GPU transform input for retained raster instances. |
| modules/…/deferred-scene-renderer.ts | Shows deferred capability selection, G-buffer lighting, and forward fallback. |
| modules/…/ray-tracing-scene-renderer.ts | Defines WebGPU ray tracing, acceleration updates, progressive history, adaptive quality, picking, channels, material texture binding, and graph statistics. |
| modules/…/ray-tracing-material-textures.ts | Defines the ray-tracing material map budget, texture revision, and shader binding adaptation. |
| modules/…/ray-tracing-scene-shaders.ts | Defines ray intersections, PBR transport, direct and emitter lighting, and history validation. |
| modules/…/pbr-material.ts | Re-exports the shared physically based material boundary used by ANARI. |
| modules/…/pbr-model.ts | Adds ANARI scene transforms, picking, alpha handling, and shadow behavior to shared PBR model construction. |
| modules/…/renderers.ts | Publishes the ANARI scene, lighting, shadow, transparency, volume, and ray-tracing interfaces. |
| modules/…/clustered-lighting.ts | Re-exports clustered light-grid support and defines the deferred clustered-lighting resolve. |
| modules/…/shadow-map-renderer.ts | Re-exports shadow-map views and depth-pass support for directional, spot, and point lights. |
| modules/…/shadow.ts | Re-exports the shared shadow shader module used by scene models. |
| modules/…/contact-shadow.ts | Re-exports the contact-shadow trace, blur, and composite path. |
| modules/…/deferred-lighting.ts | Shows the deferred lighting stage that resolves shared material and light data. |
| modules/…/deferred-ambient-lighting.ts | Shows the ambient contribution used by deferred effects. |
| modules/…/structured-volume-renderer.ts | Shows the WebGPU scalar and vector volume path. |
| modules/…/spectral-caustics.ts | Shows caustic-map sampling at the receiver. |
| modules/…/a-buffer.ts | Shows per-pixel translucent fragment capture. |
| modules/…/a-buffer-resolve-composite-shader-pass.ts | Shows A-buffer depth resolve and composition. |
| modules/…/wboit.ts | Shows weighted blended transparency capture. |
| modules/…/wboit-renderer.ts | Coordinates WBOIT depth, accumulation, revealage, and resolve passes. |
| modules/…/wboit-resolve-composite-shader-pass.ts | Shows weighted color and revealage composition. |
| modules/…/gltf-import.node.spec.ts | Demonstrates glTF conversion of geometry, materials, animation, UVs, lights, and physical properties. |
| modules/…/anari-animation.node.spec.ts | Demonstrates retained hierarchy animation, stable identities, playback, and commit coalescing. |
| modules/…/scene-interchange.node.spec.ts | Demonstrates retained ANARI to glTF round trips for animation, morphs, skins, and material data. |
| modules/…/usd-loader.node.spec.ts | Demonstrates OpenUSD layer composition, variants, overrides, materials, lights, and instancing. |
| modules/…/scene-renderer.node.spec.ts | Verifies the package boundary, shared PBR scene behavior, environment resources, and render-path contracts. |
| modules/…/anari-renderer.spec.ts | Verifies instancing, material and texture paths, deferred rendering, and ray-tracing updates across GPU backends. |