autonomous-ai/openharness/filters-and-postfx
Claude Code and agent skill by autonomous-ai/openharness
- community
Checking that the SKILL.md file is still in the repository.
Use this skill when applying visual filters or post-processing effects in Phaser 4. Covers bloom, blur, glow, color matrix, barrel distortion, displacement, custom shaders, and the filter pipeline. Triggers on: filter, post-processing, shader, bloom, blur, glow, color effects.
Install
npx vskill@latest install autonomous-ai/openharness/filters-and-postfxSKILL.md
The same SKILL.md was published earlier as phaserjs/phaser/filters-and-postfx.
Phaser 4 Filters and Post-FX
Quick Start
Add a glow effect to a sprite:
Add a blur to the camera:
Core Concepts
How Filters Work in v4
Filters are GPU-based post-processing effects applied after an object or camera renders to a texture. Each filter runs a shader pass over that texture, producing the final visual output. Filters are WebGL only.
The rendering pipeline for a camera with filters:
- Objects render to a texture the size of the camera.
- Internal filters process that texture, applying effects in object/camera local space.
- The texture is drawn to a context-sized texture, applying camera transformations (position, rotation, zoom).
- External filters process that context texture, applying effects in screen space.
- The final texture is composited into the output.
Internal vs External Filters
Every FilterList exposes two sub-lists: filters.internal and filters.external. The distinction controls when the filter runs relative to the camera/object transform:
- Internal -- applied before the camera transform. Effects operate in the object's local coordinate space. A horizontal blur on a rotated object appears rotated with the object. Internal filters only cover the object/camera region, so they are cheaper.
- External -- applied after the camera transform. Effects operate in screen space. A horizontal blur on a rotated object always blurs horizontally on screen. External filters are full-screen and more expensive.
Use internal filters wherever possible for better performance.
FilterList
FilterList (Phaser.GameObjects.Components.FilterList) is the container that holds filter controllers. It provides:
add(filter, index)-- add a Controller instance at an optional indexremove(filter, forceDestroy)-- remove and destroy a filterclear()-- remove and destroy all filtersgetActive()-- return all filters whereactive === truelist-- the raw array of Controllers (safe to reorder)- Convenience factory methods:
addBlur(),addGlow(),addMask(), etc.
Filter Controllers
Every filter is a Phaser.Filters.Controller subclass. Common Controller properties:
| Property | Type | Description | |
|---|---|---|---|
active | boolean | Toggle the filter on/off without removing it | |
camera | Camera | The camera that owns this filter | |
renderNode | string | The render node ID for the shader | |
paddingOverride | Rectangle | Override automatic padding calculation | |
ignoreDestroy | boolean | If true, the filter survives when its FilterList is destroyed (for reuse) |
Key methods: setActive(bool), setPaddingOverride(left, top, right, bottom), getPadding(), destroy().
Enabling Filters on Game Objects
Cameras have filters available by default. Game objects do not -- you must call enableFilters() first:
enableFilters() creates an internal filterCamera on the game object that handles rendering the object to a texture for filter processing. It returns this for chaining.
Related properties on game objects after enabling:
| Property | Default | Description | |
|---|---|---|---|
filterCamera | null -> Camera | The internal camera used for filter rendering | |
filters | null -> {internal, external} | Access to the FilterList pair | |
renderFilters | true | Master toggle for all filter rendering | |
filtersAutoFocus | true | Auto-adjust camera to follow the object | |
filtersFocusContext | false | Focus on the rendering context instead of the object bounds | |
filtersForceComposite | false | Always draw to a framebuffer even with no active filters | |
maxFilterSize | null -> Vector2 | Maximum texture size for filter framebuffers |
Use willRenderFilters() to check if any active filters will actually render.
Common Patterns
Adding Filters to Game Objects
Camera Filters
Chaining Multiple Filters
Filters execute in list order. Each filter receives the output of the previous one:
Masks via Filters
Masks in v4 are implemented as filters. They use the alpha channel of a texture or game object to control visibility:
Internal masks match the object being filtered. External masks match the camera context. Use a viewCamera parameter to control which camera renders the mask game object.
Wipe / Reveal Transitions
ParallelFilters (Custom Bloom and Compositing)
ParallelFilters splits the input into two paths, processes each independently, then blends the results. This replaces the dedicated Bloom filter from v3:
CaptureFrame for Scene-Level Effects
CaptureFrame captures the current render state at the point it appears in the display list. Objects rendered before it are captured; objects after it are not:
All Built-in Filters
| Filter | Add Method | Description | |
|---|---|---|---|
| Barrel | addBarrel(amount) | Pinch/expand distortion. amount=1 is neutral. | |
| Blend | addBlend(texture, blendMode, amount, color) | Blend another texture using a blend mode. Supports modes not available in standard WebGL. | |
| Blocky | addBlocky(config) | Pixelation that preserves original colors (no blending). Best without anti-aliasing. | |
| Blur | addBlur(quality, x, y, strength, color, steps) | Gaussian blur. Quality: 0=low, 1=medium, 2=high. | |
| Bokeh | addBokeh(radius, amount, contrast) | Depth-of-field bokeh blur effect. | |
| ColorMatrix | addColorMatrix() | Color manipulation via matrix. Access .colorMatrix for sepia, grayscale, brightness, hue, etc. | |
| CombineColorMatrix | addCombineColorMatrix(texture) | Combine channels from two textures via color matrices. Useful for alpha transfer. | |
| Displacement | addDisplacement(texture, x, y) | Pixel displacement using a displacement map texture. Values are very small floats (e.g. 0.005). | |
| Glow | addGlow(color, outerStrength, innerStrength, scale, knockout, quality, distance) | Luminous halo around edges. Supports inner/outer glow and knockout mode. | |
| GradientMap | addGradientMap(config) | Recolor image using a ColorRamp based on brightness. | |
| ImageLight | addImageLight(config) | Image-based lighting using a panorama environment map and normal map. | |
| Key | addKey(config) | Chroma key: remove or isolate a specific color. Config: { color, threshold, feather, isolate }. | |
| Mask | addMask(mask, invert, viewCamera, viewTransform, scaleFactor) | Alpha masking via texture or game object. | |
| NormalTools | addNormalTools(config) | Manipulate normal maps: rotate, adjust facing power, output grayscale facing data. | |
| PanoramaBlur | addPanoramaBlur(config) | Spherically-correct blur for panorama images. For use with ImageLight. Very slow. | |
| ParallelFilters | addParallelFilters() | Split input into two filter paths, blend results. Use for custom bloom. | |
| Pixelate | addPixelate(amount) | Mosaic/pixelation effect. Pixel size = 2 + amount. Blends colors (unlike Blocky). | |
| Quantize | addQuantize(config) | Reduce color palette. Supports RGBA/HSVA modes, gamma, offset, dithering. | |
| Sampler | addSampler(callback, region) | Extract pixel data from the render. Does not alter the image. Expensive. | |
| Shadow | addShadow(x, y, decay, power, color, samples, intensity) | Drop shadow with offset, decay, and color. | |
| Threshold | addThreshold(edge1, edge2, invert) | Binary threshold per channel. Edges can be arrays for per-channel control. | |
| TiltShift | addTiltShift(radius, amount, contrast, blurX, blurY, strength) | Miniature/tilt-shift effect (uses Bokeh internally). | |
| Vignette | addVignette(x, y, radius, strength, color, blendMode) | Edge darkening/coloring. Supports NORMAL, ADD, MULTIPLY, SCREEN blend modes. | |
| Wipe | addWipe(wipeWidth, direction, axis, reveal, wipeTexture) | Wipe/reveal transition. Animate progress via tween. |
API Quick Reference
Enabling and Accessing Filters
FilterList Methods
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingstore/agents/phaser/skills/filters-and-postfx/SKILL.md
Popularity
- Repository stars
- 1,068
- Repository forks
- 89
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/autonomous-ai/openharness/filters-and-postfx)