ReadonlybindOptionallayoutLayout of @group(3); omit when the snippet has no bindings.
OptionalrequiresThe snippet calls the provider's traceHitShade (capabilities.hitShade); the pass refuses a provider without it.
OptionalsampledSampled textures in layout (probes: one atlas per size), likewise (D4900). Default 0.
OptionalstorageStorage buffers in layout, counted against the device's per-stage limit. Default 0.
OptionalstorageStorage textures in layout, likewise. Default 0.
Hit shading by the provider's
traceHitShade(capabilities.hitShade:createRaytracerTraceProvider): @pmndrs/raytracer'srtShadein its FULL mode, i.e. emission +sampleslight samples (light picked by power among the scene copy's emissive triangles, sun and environment; one shadow ray each), each through the builtin diffuse + GGX BSDF. That is a path tracer's first bounce at maxDepth 1: no indirect light, no probes (the probes hold the emitters and the sky too, so adding their irradiance would count those twice; D5201). Stochastic: the pixel andsetFrame(frame)seed it; the denoiser averages it.const shading = raytracerHitShading(device); const rt = createTracedReflections(device, { ..., provider, hitShading: shading }); shading.setFrame(frameIndex); // every frame rt.dispatch(cmd, { ..., hitShadingBindGroup: shading.bindGroup });