@pmndrs/reflections
    Preparing search index...

    Class RaytracerTraceProvider

    @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)

    Implements

    Index
    capabilities: {
        anyHit: true;
        hitMaterial: true;
        hitNormal: true;
        hitShade: true;
        hitSpecular: true;
        shadingNormal: true;
    } = ...
    device: GPUDevice
    entries: readonly ModuleBindingEntry[]

    Layout entries, in the order resources() returns them. Fixed for the provider's lifetime.

    layoutVersion: 2 = RAYTRACER_BVH_LAYOUT_VERSION

    The 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.

    name: "@pmndrs/raytracer" = '@pmndrs/raytracer'

    Stable name, for labels and errors.

    packing: SceneCopyPacking

    How the scene copy is bound (fixed at creation: the WGSL and the layout depend on it).

    storageBufferCount: number

    Storage buffers among entries.

    traceBuffers: TraceSceneBuffers

    bvh's GPU buffers (nodes, triangles, top level): the same ones @pmndrs/pathtracer's PtMegakernel.setScene takes.

    • get sceneCopy(): SceneCopy

      The scene copy and its GPU buffers (for @pmndrs/pathtracer's PtMegakernel.setScene(traceBuffers, sceneCopyBuffers)).

      Returns SceneCopy

    • 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.

      Parameters

      Returns string

    • 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).

      Parameters

      • matrices: readonly ArrayLike<number>[]

      Returns void