threejs-postprocessing
$
npx mdskill add partme-ai/full-stack-skills/threejs-postprocessingEnables screen-space post-processing effects like bloom and SSAO using three.js EffectComposer and stock passes.
- Helps developers build composer chains for visual effects such as bloom, ambient occlusion, and outlines.
- Integrates with three.js EffectComposer, RenderPass, and passes like UnrealBloomPass and SSAOPass.
- Triggers on mentions of EffectComposer, specific pass names, or terms like 'bloom' and 'SSAO'.
- Provides guidance on chaining passes, resizing composers, and handling performance considerations.
SKILL.md
.github/skills/threejs-postprocessingView on GitHub ↗
---
name: threejs-postprocessing
description: "Addon screen-space post-processing for three.js using EffectComposer, Pass base class, RenderPass, and stock passes such as UnrealBloomPass, SSAOPass, SSRPass, BokehPass, OutlinePass, FXAAPass/SMAAPass, TAARenderPass, and ShaderPass; references the Shaders addon group for underlying shader modules. Use when building composer chains for bloom, SSAO, or other screen-space effects; not for basic renderer tone mapping alone (threejs-renderers)."
---
## When to use this skill
**ALWAYS use this skill when the user mentions:**
- `EffectComposer`, `RenderPass`, stacking passes, resize of composer
- Bloom, SSAO, SSR, DOF, outline, glitch, film grain, TAA—**addon** pass names
- `ShaderPass` with shader modules from Addons **Shaders** group
**IMPORTANT: postprocessing vs renderers vs node-tsl**
| Pipeline | Skill |
|----------|--------|
| Classic composer + passes | **threejs-postprocessing** |
| Renderer output color/tone only | **threejs-renderers** |
| Node/TSL post nodes | **threejs-node-tsl** |
**Trigger phrases include:**
- "EffectComposer", "RenderPass", "UnrealBloomPass", "SSAOPass", "后期"
- "泛光", "环境光遮蔽", "描边"
## How to use this skill
1. **Chain** — `RenderPass` → effect passes → output; ensure size matches renderer and DPR changes.
2. **Resize** — call `composer.setSize` alongside renderer resize workflows.
3. **Half-float** — many passes expect appropriate render target types; cite docs for your version.
4. **Performance** — each pass has cost; profile with `renderer.info` to check draw calls and triangles.
5. **Validate output** — render a simple test scene through the composer first to verify passes work before adding complexity.
6. **Shader modules** — link Addons **Shaders** list instead of inlining huge GLSL in SKILL.
7. **Output** — final pass should align color management with renderer (**threejs-renderers**).
8. **Contrast** — mention core `PostProcessing` class separately to avoid name collision confusion.
### Example: EffectComposer with bloom and debugging
```javascript
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';
const composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
const bloomPass = new UnrealBloomPass(
new THREE.Vector2(window.innerWidth, window.innerHeight),
1.5, // strength
0.4, // radius
0.85 // threshold
);
composer.addPass(bloomPass);
// Resize handler — must match renderer size
window.addEventListener('resize', () => {
renderer.setSize(window.innerWidth, window.innerHeight);
composer.setSize(window.innerWidth, window.innerHeight);
});
// Render loop: use composer.render() instead of renderer.render()
function animate() {
composer.render();
}
renderer.setAnimationLoop(animate);
```
See [examples/workflow-composer-bloom.md](examples/workflow-composer-bloom.md).
## Doc map (official)
| Docs section | Representative links |
|--------------|----------------------|
| Postprocessing | https://threejs.org/docs/EffectComposer.html |
| Postprocessing | https://threejs.org/docs/RenderPass.html |
| Postprocessing | https://threejs.org/docs/UnrealBloomPass.html |
| Shaders (addon modules) | https://threejs.org/docs/module-CopyShader.html |
## Scope
- **In scope:** Addon postprocessing passes and composer wiring; pointers to shader modules.
- **Out of scope:** Custom full-screen pipeline design outside three docs; engine-level frame graphs.
## Common pitfalls and best practices
- Forgetting composer resize produces smeared or low-res effects.
- Pass order matters—bloom often after main scene pass, outline may need masks.
- Some passes need depth—ensure depth buffer availability per pass docs.
## Documentation and version
Addon passes live under [Postprocessing](https://threejs.org/docs/#Postprocessing) and **Shaders** modules in [three.js docs](https://threejs.org/docs/). Pass constructors and required buffers change across versions—link the specific pass page (e.g. `UnrealBloomPass`) rather than guessing uniform names.
## Agent response checklist
When answering under this skill, prefer responses that:
1. Link `EffectComposer`, `RenderPass`, or the named pass (`SSAOPass`, …).
2. Contrast **addon** composer stack with core `PostProcessing` + **threejs-node-tsl** when users mix terms.
3. Require `setSize` on composer when **threejs-renderers** resizes.
4. Point to **Shaders** group for raw shader modules used by `ShaderPass`.
5. Warn about VR frame-time when stacking heavy passes (**threejs-webxr**).
## References
- https://threejs.org/docs/#Postprocessing
- https://threejs.org/docs/EffectComposer.html
- https://threejs.org/docs/RenderPass.html
## Keywords
**English:** effectcomposer, renderpass, bloom, ssao, ssr, outline, postprocessing, three.js
**中文:** 后期、EffectComposer、泛光、SSAO、SSR、屏幕空间、three.js
More from partme-ai/full-stack-skills
- adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
- angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
- ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
- ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
- ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
- ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
- ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
- api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
- appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
- ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."