Packs / threejs-public
post-processing-bloom
Add a post-processing chain (render pass, bloom, output pass with tone mapping) to a three.js scene, with a quality switch for phones
Install
logicpacks pack use threejs-public/post-processing-bloomget_pack threejs-public/post-processing-bloomThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
static-local - Checks: 2 in
outcome/checks.yaml - Code:
boot.jsindex.htmlmain.js - Tools: python3, playwright-python, chromium
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
Bloom/glow via EffectComposer that stays correct in colour (OutputPass last) and can be turned down or off on weak devices.
Steps
- Copy
code/;?quality=lowhalves the bloom resolution,?fx=offskips the composer. - Add passes between RenderPass and OutputPass only.
- Resize the composer together with the renderer (template does).
- Check:
python3 ../tools/webgl_check.py code --js "window.__fx.passes >= 3".
Edge cases
- Composer + MSAA: use a multisampled render target or FXAA/SMAA pass.
- Transparent backgrounds don't survive most effects.
Don'ts
- Don't tone-map twice (renderer + OutputPass).
- Don't run full-res bloom on phones.