Bloom

블룸

A post-processing effect where bright areas bleed outward — mimicking a camera lens saturating under strong light.

Also known as: GlowUnrealBloomPassEffectComposer
···
js
import * as THREE from 'three';
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
document.body.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x030308);
const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
camera.position.set(0, 0.5, 6.5);
const core = new THREE.Mesh(new THREE.IcosahedronGeometry(0.9, 1), new THREE.MeshBasicMaterial({ color: 0xffffff }));
scene.add(core);
const ring1 = new THREE.Mesh(new THREE.TorusGeometry(1.9, 0.045, 16, 100), new THREE.MeshBasicMaterial({ color: 0xff3d7a }));
ring1.rotation.x = Math.PI / 2.3;
scene.add(ring1);
const ring2 = new THREE.Mesh(new THREE.TorusGeometry(2.4, 0.03, 16, 100), new THREE.MeshBasicMaterial({ color: 0x3dd6ff }));
ring2.rotation.x = Math.PI / 2.7;
ring2.rotation.y = 0.6;
scene.add(ring2);
const composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
const bloom = new UnrealBloomPass(new THREE.Vector2(innerWidth, innerHeight), 1.35, 0.75, 0.15);
composer.addPass(bloom);
composer.addPass(new OutputPass());
function resize() {
  renderer.setSize(innerWidth, innerHeight);
  camera.aspect = innerWidth / innerHeight;
  camera.updateProjectionMatrix();
  composer.setSize(innerWidth, innerHeight);
  composer.setPixelRatio(Math.min(devicePixelRatio, 2));
}
addEventListener('resize', resize); resize();
renderer.setAnimationLoop((t) => {
  core.rotation.y = t * 0.0006;
  ring1.rotation.z = t * 0.0004;
  ring2.rotation.z = -t * 0.0003;
  composer.render();
});

Bloom is a post-processing effect that reprocesses the fully rendered frame. In three.js, EffectComposer chains passes together: RenderPass (render the scene normally) → UnrealBloomPass (extract the bright pixels, blur them, and add them back) → OutputPass (convert color space back for display).

The key parameter is UnrealBloomPass(resolution, strength, radius, threshold)’s threshold — pixels dimmer than this are excluded from the glow. That lets you make only the brightest objects, like a pure-white core, actually bloom.

The demo spins a pure-white MeshBasicMaterial core alongside two saturated rings. The core, being overwhelmingly bright, blooms hard; the rings glow more subtly. Remember to call composer.render() instead of renderer.render().

When to use

Emphasize neon or glowing elements, game or product showcase highlights. Overdo it and the whole frame turns hazy — always tune the threshold.