PBR materials and light transport
PBR and path tracing describe different parts of rendering. PBR uses physical models to describe how materials respond to light; path tracing estimates how light travels through a scene. For an interactive, realistically lit wall, the practical comparison is a rasterized renderer using PBR materials versus a path-traced renderer.
Material response and light transport
Separate the responsibilities:
- Material model: how a surface scatters arriving light. Roughness and metalness describe different aspects of this response.
- Transport/rendering method: how illumination and visibility are estimated across the scene to form an image.
Three.js MeshStandardMaterial illustrates the material side of that distinction.
In a conventional rasterized setup, projected triangles establish visible surfaces. Shaders evaluate material response using lights and other supplied illumination. Shadow maps, environment maps, baked lighting, or other methods handle effects the basic pass does not calculate. Rasterization does not inherently forbid indirect lighting; additional techniques can provide it.
A path tracer samples paths from the camera through surface interactions and estimates their contributions. For example, illumination from a source can bounce off a brown floor onto a pale wall before reaching the eye. Repeating and averaging samples reduces stochastic noise; that noise is an estimation artifact, not material texture or intentional film grain. Accuracy remains bounded by scene data and implementation choices. PBRT: path tracing
Seeing the distinction on a wall
Consider a pale wall above a brown floor: direct illumination follows lamp → wall → eye; indirect illumination can follow lamp → brown floor → wall → eye. The latter gives the wall a warm tint. Rasterization first projects the scene's triangles onto a pixel grid and finds visible surfaces; shading then uses available illumination information. A basic direct-light setup will not derive the floor bounce merely because a floor exists. Additional lighting techniques can supply it. A path tracer can estimate both paths from the modeled scene, usually constructing paths backwards from the camera. This is numerical sampling, not simulation of every photon.
Changing material roughness affects the surface response in either approach. Changing a floor from brown to blue affects a path tracer's sampled bounce contribution; a fixed fill light used to imitate that bounce does not change automatically. Dynamic indirect-light techniques in a rasterized or hybrid renderer can also respond, so this example compares a basic setup with a path tracer, not an absolute limitation of rasterization.
Illustrative Three.js material setup, not executed:
const wallMaterial = new THREE.MeshStandardMaterial({
color: 0xcccccc,
roughness: 0.85,
metalness: 0
});
This creates material parameters. It does not create a wall, light, camera, rendering loop, or path tracer. Both rendering approaches may use the same conceptual material properties, although exact material support varies by implementation.
Connection to FoilCard: a pointer event can update appearance parameters in either system. FoilCard writes CSS variables; a Three.js handler might update a light's position. The renderer, not React or the input handler, determines how the resulting image is calculated.
For one wall and a few controllable lights, rasterized PBR is a reasonable initial method. Revisit path tracing when indirect bounce, complex reflections, or emitter/occluder interactions become central.
Library, GPU API and renderer
The Three.js documentation examined for this September 2026 example separates the library from the rendering algorithm. Its ordinary built-in 3D mesh rendering uses rasterization. WebGLRenderer uses WebGL 2; WebGPURenderer normally uses WebGPU with WebGL 2 fallback. Using the latter does not automatically introduce path tracing. Pairing either with supported PBR materials is the rasterized PBR approach discussed here; Three.js also provides non-PBR materials.
Path tracing is possible through additional implementations. The external three-gpu-pathtracer package uses WebGL 2 and wraps a Three.js renderer: its usage example calls pathTracer.renderSample() rather than the ordinary scene-render call. This demonstrates that the GPU API (WebGL/WebGPU), material model (PBR), and rendering algorithm (rasterization/path tracing) are separate choices.
The API examples are described in the WebGLRenderer and WebGPURenderer documentation, and the external three-gpu-pathtracer usage example. No comparative performance measurement is implied by this choice of starting method.