DepthOfField
A depth of field effect.
Based on a graphics study by Adrian Courrèges and an article by Steve Avery: https://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/ https://pixelmischiefblog.wordpress.com/2016/11/25/bokeh-depth-of-field/
import { DepthOfField } from '@react-three/postprocessing'
return (
<DepthOfField
focusDistance={3} // where to focus, in world units
focusRange={2} // depth range that stays in focus, in world units
bokehScale={2} // bokeh size
/>
)
Example
Props
focalLength, worldFocusDistance, worldFocusRange, width, height and blur are deprecated.