# Post-Processing Effects Visual effects applied after scene render. Two effect systems available. ```bash pnpm add @tresjs/post-processing ``` ## Effect Composers ### EffectComposer (Three.js native) Uses Three.js built-in effects: ```vue ``` ### EffectComposerPmndrs (pmndrs postprocessing) Uses pmndrs/postprocessing library (more effects, better performance): ```vue ``` **Rule:** Pmndrs effects end with `Pmndrs` suffix and require `EffectComposerPmndrs`. ## Three.js Effects (EffectComposer) ### UnrealBloom Glow around bright areas: ```vue ``` | Prop | Description | Default | | ----------- | ---------------- | ------- | | `strength` | Bloom intensity | `1` | | `radius` | Bloom spread | `0` | | `threshold` | Luminance cutoff | `0` | ### Glitch Digital glitch distortion: ```vue ``` ### Halftone Halftone print effect: ```vue ``` ### Pixelation Pixelated look: ```vue ``` ### Output Color space/tone mapping: ```vue ``` ### SMAA Anti-aliasing pass: ```vue ``` ## Pmndrs Effects (EffectComposerPmndrs) More effects with better performance through effect merging. ### BloomPmndrs Advanced bloom: ```vue ``` | Prop | Description | Default | | -------------------- | -------------------------------- | ------- | | `intensity` | Effect strength | `1` | | `luminanceThreshold` | Brightness cutoff (0-1) | `0.9` | | `luminanceSmoothing` | Threshold smoothness | `0.025` | | `mipmapBlur` | Enable mipmap blur (like Unreal) | `false` | | `radius` | Blur radius | - | ### DepthOfFieldPmndrs Camera focus blur: ```vue ``` | Prop | Description | Default | | -------------------- | ------------------------------- | ------- | | `focusDistance` | Normalized focus distance (0-1) | - | | `focusRange` | Focus range (0-1) | `0.1` | | `bokehScale` | Bokeh blur scale | `1` | | `worldFocusDistance` | Focus in world units | - | ### GlitchPmndrs Digital glitch: ```vue ``` | Prop | Description | Default | | ---------- | -------------------------------------------- | ------------ | | `delay` | [min, max] delay between glitches (s) | `[1.5, 3.5]` | | `duration` | [min, max] glitch duration (s) | `[0.6, 1.0]` | | `strength` | [weak, strong] glitch intensity | `[0.3, 1.0]` | | `mode` | `SPORADIC`, `CONSTANT_MILD`, `CONSTANT_WILD` | `SPORADIC` | | `active` | Enable/disable | - | ### ChromaticAberrationPmndrs Color fringing: ```vue ``` ### VignettePmndrs Darkened edges: ```vue ``` ### NoisePmndrs Film grain: ```vue ``` ### OutlinePmndrs Object outlines: ```vue ``` ### Other Pmndrs Effects | Effect | Description | | -------------------------- | --------------------------- | | `AsciiPmndrs` | ASCII art rendering | | `BarrelBlurPmndrs` | Barrel distortion with blur | | `BrightnessContrastPmndrs` | Adjust brightness/contrast | | `ColorAveragePmndrs` | Grayscale conversion | | `ColorDepthPmndrs` | Reduce color depth | | `DotScreenPmndrs` | Dot matrix effect | | `FishEyePmndrs` | Fisheye lens distortion | | `FXAAPmndrs` | Fast anti-aliasing | | `GodRaysPmndrs` | Volumetric light rays | | `GridPmndrs` | Grid overlay | | `HueSaturationPmndrs` | Color adjustment | | `KuwaharaPmndrs` | Painterly effect | | `LensDistortionPmndrs` | Lens distortion | | `LinocutPmndrs` | Linocut print effect | | `PixelationPmndrs` | Pixelation | | `ScanlinePmndrs` | CRT scanlines | | `SepiaPmndrs` | Sepia tone | | `ShockWavePmndrs` | Shockwave ripple | | `SMAAPmndrs` | Enhanced anti-aliasing | | `TexturePmndrs` | Texture overlay | | `TiltShiftPmndrs` | Miniature effect | | `ToneMappingPmndrs` | Tone mapping | ## Effect Stacking Effects apply in order. Combine for complex looks: ```vue ``` ## Performance 1. **Use Pmndrs** - effects are merged into fewer passes 2. **Limit effects** - each adds GPU cost 3. **Consider mobile** - reduce or disable on low-end devices 4. **Wrap in Suspense** - effects load asynchronously ```vue ```