SelectiveBloom
A selective bloom effect.
This effect applies bloom to selected objects only.
Attention: If you don't need to limit bloom to a subset of objects, consider using the BloomEffect instead for better performance.
import { SelectiveBloom } from '@react-three/postprocessing'
import { BlendFunction, Resolution, KernelSize } from 'postprocessing'
return (
<SelectiveBloom
lights={[lightRef1, lightRef2]} // ⚠️ REQUIRED! all relevant lights
selection={[meshRef1, meshRef2]} // selection of objects that will have the bloom effect
selectionLayer={10} // selection layer
inverted={false} // consider the selection inverted
ignoreBackground={false} // discard the background of the selection
luminanceThreshold={1.0} // luminance threshold. Raise this value to mask out darker elements in the scene.
luminanceSmoothing={0.03} // smoothness of the luminance threshold. Range is [0, 1]
mipmapBlur={true} // enables/disables mipmap blur
intensity={1.0} // the bloom intensity
radius={0.85} // the blur radius, only applies to mipmap blur
levels={8} // the amount of MIP levels, only applies to mipmap blur
kernelSize={KernelSize.LARGE} // blur kernel size, ignored if mipmapBlur is enabled
resolutionScale={0.5} // render resolution scale, ignored if mipmapBlur is enabled
resolutionX={Resolution.AUTO_SIZE} // render width, ignored if mipmapBlur is enabled
resolutionY={Resolution.AUTO_SIZE} // render height, ignored if mipmapBlur is enabled
/>
)