# pathtracer ## Documentation - [Introduction](/getting-started/introduction): WebGPU ray tracing and physically based path tracing for the web. - [Installation](/getting-started/installation): Add the packages to a WebGPU project. - [Your first render](/getting-started/your-first-render): A complete program, from triangles to a converged image. - [Loading glTF](/getting-started/loading-gltf): loadGltf turns a .glb or .gltf into a scene with OpenPBR materials. - [Choosing a package](/getting-started/choosing-a-package): When the trace core is enough, and when you want the path tracer. - [Browser and GPU support](/getting-started/browser-support): Where it runs, what it uses when present, and what we test on. - [Examples](/getting-started/examples): Every example, one page each, with its source. - [Conventions](/concepts/conventions): Spaces, units, signs and image layout shared by both packages. - [Scenes](/concepts/scenes): Meshes and instances, the BVH, the scene copy, and the formats a kernel is compiled for. - [Materials](/concepts/materials): The OpenPBR parameter set, which lobes the path tracer renders, and how a kernel compiles only the lobes a scene uses. - [Lights](/concepts/lights): Emissive triangles, the sun and the environment, and how the path tracer samples them. - [Sampling](/concepts/sampling): Samplers, seeds and sample indices, blue noise, path depth and Russian roulette. - [Schedulers](/concepts/schedulers): The megakernel and the wavefront scheduler, what each is good at, and how to choose with ptwfAutoPolicy. - [Modes](/concepts/modes): The reference, preview and realtime presets, what each one sets, and how your own options override them. - [Overview](/raytracer/overview): The trace core, for renderers that need rays but do their own shading. - [Inline WGSL](/raytracer/inline-wgsl): rtModuleWgsl gives you trace functions to call from your own compute shader. - [Batch tracer](/raytracer/batch-tracer): RtBatchTracer traces a GPU buffer of rays into a GPU buffer of results. - [Interval queries (experimental)](/raytracer/interval-queries): Closest hit and visibility inside a half-open distance range, for radiance cascades and probe tracing. - [Scene copy](/raytracer/scene-copy): Materials, lights, light sampling and textures, as your shader reads them. - [Shading](/raytracer/shading): rtShade gives the light leaving a hit toward the viewer, with one shadow ray. - [Capabilities](/raytracer/capabilities): What a device offers, how to ask for it, and how kernels compile against it. - [API reference](/raytracer/api): The public exports of @pmndrs/raytracer, grouped by area. - [Megakernel](/pathtracer/megakernel): PtMegakernel runs a whole path per thread, one dispatch per sample pass. - [Wavefront](/pathtracer/wavefront): PtWavefront splits a path into small kernels connected by GPU queues and indirect dispatch. - [Integrator options](/pathtracer/integrator-options): Every setting of PtIntegratorOptions, with its default and what it changes. - [Outputs](/pathtracer/outputs): AOVs for a denoiser, debug counters, and where the real-time frame planes fit. - [Real time](/pathtracer/realtime): One sample per pixel per frame, with the planes a temporal denoiser and an upscaler read. - [ReSTIR DI and GI (experimental)](/pathtracer/restir): Reservoir resampling of light samples and of indirect bounces, reused across pixels and frames. - [Volumes (experimental)](/pathtracer/volumes): Homogeneous and grid participating media inside closed meshes, with scattering and shadows. - [Spectral rendering (experimental)](/pathtracer/spectral): Paths that carry wavelengths instead of RGB channels, for spectral references and dispersion. - [MaterialX (experimental)](/pathtracer/materialx): Render MaterialX graphs by baking them to textures or compiling them to WGSL. - [API reference](/pathtracer/api): The exports of @pmndrs/pathtracer a program calls, grouped by area. ## MCP Server This documentation is available via Model Context Protocol (MCP) server at https://docs.pmnd.rs/api/mcp Configure in your MCP client: ```json { "mcpServers": { "pmndrs": { "type": "http", "url": "https://docs.pmnd.rs/api/mcp" } } } ``` --- For full documentation content, see llms-full.txt