Adapters

Which engine adapter has which feature. three.js, React Three Fiber, Babylon.js and pixi.js side by side.

The core of @pmndrs/reflections runs on a bare GPUDevice and knows no engine. Each adapter turns an engine's frame into the frame contract and puts the result back. The adapters do not all have the same parts wired in. This page lists what each has.

Feature matrix

Featurethree.jsReact Three FiberBabylon.jspixi.js
Reflection probesYesYesYesYes
Bounce light from the probesYesYesYes (probeIrradiance)No
Screen-space reflectionsYesYesYesYes
Ray-traced fallbackYesYesNoNo
Denoiser seamYesYesNoYes
Presets (default, performance)YesYesNoNo
Hybrid resolve (HybridReflections)YesYesNoNo
One-call setup (Reflections.create)YesYes, in a hookNoNo
StatusMain adapterUses the three.js adapterExperimentalExperimental

React Three Fiber is not a separate adapter. It is the three.js adapter under a <Canvas>, with a hook from the example that calls Reflections.create.

What the rows mean:

  • Probes. Baked, prefiltered captures of the scene, blended by influence volume. Reflection probes.
  • Bounce light from the probes. Materials take their diffuse image-based lighting from the probes. three: scene.environmentNode. Babylon: a material plugin per PBR material. pixi-3d lights from its own environment.
  • Screen-space reflections. The tracer that marches the depth buffer. Screen-space reflections.
  • Ray-traced fallback. Rays through a BVH for what the screen misses, through @pmndrs/raytracer. Ray-traced fallback.
  • Denoiser seam. You pass a temporal denoiser (denoiser/ffx) and the adapter runs it on the traced signal. Denoising and upscaling.
  • Presets. Named bundles of settings, applied with preset or applyReflectionsPreset. Performance and quality.
  • Hybrid resolve. One object that picks the screen hit, the traced hit, the probe or the environment per pixel, and denoises the result. Hybrid resolve.
  • One-call setup. One await Reflections.create(renderer, scene, options) and one reflections.render(camera) per frame.

On Babylon and pixi the tracer takes the probes (and an environment slot) as its fallback, and a composite adds the result to the lit image. That is screen space with probes behind it. It is not the hybrid resolve.

Which adapter do I need

  • three.js, with or without React. The three.js page or the React Three Fiber page. Start with Reflections.create.
  • Babylon.js. The Babylon.js page. You build a frame graph with the two reflection tasks.
  • pixi.js. The pixi.js page. It needs the pixi-3d closed beta.
  • Another engine. Use @pmndrs/reflections/core on a GPUDevice. An adapter maps the engine's G-buffer, camera and conventions onto the frame contract, then reuses the core passes.

Peer packages by adapter

AdapterRequiredOptional
three.js, React Three Fiberthree >=0.187.0@pmndrs/raytracer ^0.1.0 and @pmndrs/bvh ^0.1.0 for ray tracing, denoiser ^2.0.0
Babylon.js@babylonjs/core >=9.35.0 <10none
pixi.jspixi.js >=8.22.0 <9, and pixi-3d (closed beta)denoiser ^2.0.0

All of them need a browser with WebGPU. There is no WebGL path.

Each engine has a live page on the same two rooms, so you can compare them at the same view: three.js, React Three Fiber, Babylon.js and raw WebGPU. The pixi.js page needs the closed beta and is not on the site. See the examples page.