@@ -11,36 +11,46 @@ Attention: If you don't need to limit bloom to a subset of objects, consider usi
1111
1212``` jsx
1313import { SelectiveBloom } from ' @react-three/postprocessing'
14- import { BlurPass , Resizer , KernelSize } from ' postprocessing'
14+ import { BlendFunction , Resolution , KernelSize } from ' postprocessing'
1515
1616return (
1717 < SelectiveBloom
1818 lights= {[lightRef1, lightRef2]} // ⚠️ REQUIRED! all relevant lights
19- selection= {[meshRef1, meshRef2]} // selection of objects that will have bloom effect
19+ selection= {[meshRef1, meshRef2]} // selection of objects that will have the bloom effect
2020 selectionLayer= {10 } // selection layer
21- intensity= {1.0 } // The bloom intensity.
22- blurPass= {undefined } // A blur pass.
23- width= {Resizer .AUTO_SIZE } // render width
24- height= {Resizer .AUTO_SIZE } // render height
25- kernelSize= {KernelSize .LARGE } // blur kernel size
26- luminanceThreshold= {0.9 } // luminance threshold. Raise this value to mask out darker elements in the scene.
27- luminanceSmoothing= {0.025 } // smoothness of the luminance threshold. Range is [0, 1]
21+ inverted= {false } // consider the selection inverted
22+ ignoreBackground= {false } // discard the background of the selection
23+ luminanceThreshold= {1.0 } // luminance threshold. Raise this value to mask out darker elements in the scene.
24+ luminanceSmoothing= {0.03 } // smoothness of the luminance threshold. Range is [0, 1]
25+ mipmapBlur= {true } // enables/disables mipmap blur
26+ intensity= {1.0 } // the bloom intensity
27+ radius= {0.85 } // the blur radius, only applies to mipmap blur
28+ levels= {8 } // the amount of MIP levels, only applies to mipmap blur
29+ kernelSize= {KernelSize .LARGE } // blur kernel size, ignored if mipmapBlur is enabled
30+ resolutionScale= {0.5 } // render resolution scale, ignored if mipmapBlur is enabled
31+ resolutionX= {Resolution .AUTO_SIZE } // render width, ignored if mipmapBlur is enabled
32+ resolutionY= {Resolution .AUTO_SIZE } // render height, ignored if mipmapBlur is enabled
2833 / >
2934)
3035```
3136
3237## Props
3338
34- | Name | Type | Default | Description |
35- | ------------------ | ------------------------------------------------------------------------------------------------------------ | -------------------- | ---------------------------------------------------------------------------------------------------- |
36- | selection | Objects | | Selection of objects that will be outlined |
37- | lights | Lights | | All lights that will affect the effect |
38- | blendFunction | BlendFunction | BlendFunction.SCREEN | The blend function of this effect. |
39- | width | Number | Resizer.AUTO_SIZE | The render width. |
40- | height | Number | Resizer.AUTO_SIZE | The render height. |
41- | selectionLayer | Number | | The selection layer |
42- | blurPass | [ BlurPass] ( https://vanruesc.github.io/postprocessing/public/docs/class/src/passes/BlurPass.js~BlurPass.html ) | null | An efficient, incremental blur pass. |
43- | kernelSize | KernelSize | KernelSize.LARGE | The blur kernel size. |
44- | luminanceThreshold | Number | 0.9 | The luminance threshold. Raise this value to mask out darker elements in the scene. Range is [ 0, 1] . |
45- | luminanceSmoothing | Number | 0.025 | Controls the smoothness of the luminance threshold. Range is [ 0, 1] . |
46- | intensity | Number | 1 | Intensity of the effect |
39+ | Name | Type | Default | Description |
40+ | ------------------ | ------------- | -------------------- | ---------------------------------------------------------------------------------------------------- |
41+ | selection | Objects | | Selection of objects that will have the bloom effect |
42+ | lights | Lights | | All lights that will affect the effect - required |
43+ | selectionLayer | Number | 10 | The selection layer |
44+ | inverted | Boolean | false | Consider the selection inverted. |
45+ | ignoreBackground | Boolean | false | Discard the background of the selection. |
46+ | blendFunction | BlendFunction | BlendFunction.SCREEN | The blend function of this effect. |
47+ | luminanceThreshold | Number | 1.0 | The luminance threshold. Raise this value to mask out darker elements in the scene. Range is [ 0, 1] . |
48+ | luminanceSmoothing | Number | 0.03 | Controls the smoothness of the luminance threshold. Range is [ 0, 1] . |
49+ | mipmapBlur | Boolean | true | Enables or disables mipmap blur. |
50+ | intensity | Number | 1.0 | The bloom intensity. |
51+ | radius | Number | 0.85 | The blur radius. Only applies to mipmap blur. |
52+ | levels | Number | 8 | The amount of MIP levels. Only applies to mipmap blur. |
53+ | kernelSize | KernelSize | KernelSize.LARGE | The blur kernel size. Ignored if ` mipmapBlur ` is enabled. |
54+ | resolutionScale | Number | 0.5 | The render resolution scale. Ignored if ` mipmapBlur ` is enabled. |
55+ | resolutionX | Number | Resolution.AUTO_SIZE | The render width. Ignored if ` mipmapBlur ` is enabled. |
56+ | resolutionY | Number | Resolution.AUTO_SIZE | The render height. Ignored if ` mipmapBlur ` is enabled. |
0 commit comments