The offset prop types accept anything ReactThreeFiber.Vector2-shaped, so this compiles:
const ref = useRef<ChromaticAberrationEffect>(null)
<ChromaticAberration ref={ref} offset={[0.001, 0.0005]} />
but the common animation pattern then throws:
ref.current.offset.set(0.002, 0.001)
// TypeError: ref.current.offset.set is not a function
Why: in v3, ChromaticAberration is a bare wrapEffect(ChromaticAberrationEffect). The raw props object goes straight to the effect constructor, and ChromaticAberrationEffect stores whatever it receives into new Uniform(offset) with no coercion — so effect.offset ends up a plain array. R3F's math-prop conversion never runs because the value travels through args, not applyProps.
Regression note: v2 coerced this (#224). The coercion didn't survive the v3 wrapEffect rewrite. Glitch still does it correctly via the useVector2 helper in util.tsx — ChromaticAberration just doesn't use it.
Versions: @react-three/postprocessing 3.0.4, postprocessing 6.39.1, @react-three/fiber 9.6.1, React 19.2.
Workaround meanwhile: own a Vector2 and reassign effect.offset post-mount.
The
offsetprop types accept anythingReactThreeFiber.Vector2-shaped, so this compiles:but the common animation pattern then throws:
Why: in v3,
ChromaticAberrationis a barewrapEffect(ChromaticAberrationEffect). The raw props object goes straight to the effect constructor, andChromaticAberrationEffectstores whatever it receives intonew Uniform(offset)with no coercion — soeffect.offsetends up a plain array. R3F's math-prop conversion never runs because the value travels throughargs, notapplyProps.Regression note: v2 coerced this (#224). The coercion didn't survive the v3
wrapEffectrewrite.Glitchstill does it correctly via theuseVector2helper inutil.tsx—ChromaticAberrationjust doesn't use it.Versions:
@react-three/postprocessing3.0.4,postprocessing6.39.1,@react-three/fiber9.6.1, React 19.2.Workaround meanwhile: own a
Vector2and reassigneffect.offsetpost-mount.