TiltShift

A tilt-shift blur effect, simulating a shallow depth of field along a band across the screen - the classic "miniature model" look. For a version with more direct control over the band's start/end/direction, see TiltShift2.

import { TiltShift } from '@react-three/postprocessing'
import { BlendFunction, KernelSize } from 'postprocessing'

return (
  <TiltShift
    blendFunction={BlendFunction.ADD} // the blend function of this effect
    offset={0.0} // the relative offset of the focus area
    rotation={0.0} // the rotation of the focus area, in radians
    focusArea={0.4} // the relative size of the focus area
    feather={0.3} // the softness of the focus area edges
    kernelSize={KernelSize.MEDIUM} // the blur kernel size
    resolutionScale={0.5} // the resolution scale
  />
)

Props

NameTypeDefaultDescription
blendFunctionBlendFunctionBlendFunction.ADDThe blend function of this effect.
offsetNumber0.0The relative offset of the focus area.
rotationNumber0.0The rotation of the focus area, in radians.
focusAreaNumber0.4The relative size of the focus area.
featherNumber0.3The softness of the focus area edges.
kernelSizeKernelSizeKernelSize.MEDIUMThe blur kernel size.
resolutionScaleNumber0.5The resolution scale.
resolutionXNumberResolution.AUTO_SIZEThe horizontal resolution.
resolutionYNumberResolution.AUTO_SIZEThe vertical resolution.