ReadonlycapabilitiesReadonlydeviceReadonlyentriesLayout entries, in the order resources() returns them. Fixed for the provider's lifetime.
ReadonlyinfoReadonlylayoutThe version of the GPU layout the WGSL reads, for providers over a versioned layout (@pmndrs/bvh
exports GPU_LAYOUT_VERSION). The provider checks it against the package it loaded at start-up;
the pass only reports it.
ReadonlynameStable name, for labels and errors.
ReadonlypackingHow the scene copy is bound (fixed at creation: the WGSL and the layout depend on it).
ReadonlystorageStorage buffers among entries.
Readonlytracebvh's GPU buffers (nodes, triangles, top level): the same ones @pmndrs/pathtracer's PtMegakernel.setScene takes.
The scene copy and its GPU buffers (for @pmndrs/pathtracer's PtMegakernel.setScene(traceBuffers, sceneCopyBuffers)).
Increments whenever resources() would return different objects.
WGSL declaring this provider's bindings at slot (in entries order) and defining
traceFirstHit (+ traceHitMaterial / traceAny per capabilities). Other global names
should carry a provider prefix so they never collide with the pass.
The current resources, one per entry.
The sun or environment changed.
Material colours changed (same indices).
Instances moved: rebuild the top level on the CPU from new object-to-world matrices (one per instance, in the order given at creation) and the scene copy (instance transforms, light areas). Mesh trees are untouched. The scene copy is rebuilt whole (@pmndrs/raytracer has no incremental update yet, its P1.4b).
@pmndrs/raytracer behind core's trace seam. Create it with createRaytracerTraceProvider.
const rt = await createRaytracerTraceProvider(device, { meshes, instances, materials, lights }); // instances moved: rt.setTransforms(matrices) (new top level; scene copy rebuilt) // materials changed: rt.setMaterials(materials)