Selective UnrealBloomPass for three.js
This is a modification of the UnrealBloomPass for Three.js. This project integrates the selective bloom system as shown in the Three.js selective UnrealBloomPass example into the UnrealBloomPass itself. This simply uses the layers system to designate the object that we wanted to have bloom on. This modified version can also still act the normal UnrealBloomPass.
- Three >= r0.137.5
npm i @visualsource/selective-unrealbloompass
import { SelectiveUnrealBloomPass } from '@visualsource/selective-unrealbloompass';
const bloomPass = new SelectiveUnrealBloomPass( new THREE.Vector2( window.innerWidth, window.innerHeight ), 1.5, 0.4, 0.85);
...
composer.addPass( bloomPass );
import { SelectiveUnrealBloomPass } from '@visualsource/selective-unrealbloompass';
const BLOOM = 1;
// setup renderer, camera, scene, etc
camera.layers.enable(BLOOM);
const bloomPass = new SelectiveUnrealBloomPass( new THREE.Vector2( window.innerWidth, window.innerHeight ), 1.5, 0.4, 0.85, true, BLOOM, scene, camera );
composer.addPass( bloomPass );
// create a object to apply bloom to
object.layers.set(BLOOM);
/// render scene
The examples are in the examples folder and are the sample as threejs versions but with the modified UnrealBloomPass.
- VisualSource
- 1.0.1
- Fixed README Typos
- 1.0.0
- Initial Release
This project is licensed under the MIT License - see the LICENSE file for details
Inspiration, code snippets, etc.