r3f-postprocessing
Installation
SKILL.md
React Three Fiber postprocessing
Check the actual renderer and package peer dependencies first. This example targets Fiber 9.7 / React 19 with @react-three/postprocessing 3.1 and postprocessing 6.39 on WebGL. Do not combine arbitrary newest package versions or silently upgrade a project.
Choose the pipeline
- The React postprocessing composer here is for WebGL. Three.js WebGPURenderer uses node effects and
RenderPipelineon r183+; verify that backend separately. - Let one owner render the final scene. EffectComposer uses a positive frame priority; an additional manual
gl.rendercan overwrite or duplicate its output. - Ordinary Bloom can isolate bright surfaces via an HDR threshold. Use SelectiveBloom only when actual object selection is required; it adds work.
Actual selected-object bloom
Mount beneath Canvas. Click the left box to toggle selection. Both boxes are bright, but only the selected object contributes to this bloom pass.
import { useMemo, useRef, useState } from 'react'
import { EffectComposer, Select, Selection, SelectiveBloom, ToneMapping } from '@react-three/postprocessing'
import { ToneMappingMode } from 'postprocessing'
import type { DirectionalLight } from 'three'