
Pixijs Filters
Install this when applying blur, color matrix, displacement, noise, or custom GLSL/WGSL filters to PixiJS v8 containers with correct options and filterArea tuning.
Overview
PixiJS Filters is an agent skill for the Build phase that applies PixiJS v8 built-in and custom filter pipelines to containers with correct options and filterArea optimization.
Install
npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-filtersWhat is this skill?
- Covers built-in AlphaFilter, BlurFilter, ColorMatrixFilter, DisplacementFilter, and NoiseFilter with chaining via filter
- Documents Filter.from() for custom GLSL/WGSL fragment shaders and uniform wiring.
- Explains resolution, padding, antialias, and blendRequired options on the filter pipeline.
- Includes filterArea Rectangle optimization to limit GPU work on large stages.
- References pixi-filters community package and links pixijs-performance for tuning.
- 5 named built-in filter types documented: Alpha, Blur, ColorMatrix, Displacement, Noise
Adoption & trust: 1.3k installs on skills.sh; 206 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your PixiJS scene needs blur, color grading, or custom shader effects but agents misuse filters arrays, Filter.from, or filterArea and hurt performance.
Who is it for?
Indie game and interactive UI developers polishing PixiJS v8 visuals who want correct built-in and custom filter snippets.
Skip if: Projects using only CSS/DOM filters, or teams not on PixiJS v8’s container filter model.
When should I use this skill?
Applying visual effects via PixiJS v8 filter pipeline; triggers on filters, BlurFilter, ColorMatrixFilter, Filter.from, GLSL filter, pixi-filters, or filterArea.
What do I get? / Deliverables
After the skill runs, your agent produces valid filter chains, tuned filterArea bounds, and custom Filter.from shaders aligned with PixiJS v8.
- Filter chain configuration on containers
- Custom Filter.from shader setup
- filterArea performance bounds
Recommended Skills
Journey fit
How it compares
Use instead of generic WebGL shader blogs when the target API is PixiJS container.filters and Filter.from, not raw Three.js materials.
Common Questions / FAQ
Who is pixijs-filters for?
Solo builders shipping PixiJS v8 games or rich canvas apps who need agents to wire blur, color matrix, displacement, noise, or custom GLSL filters correctly.
When should I use pixijs-filters?
Use it in Build → frontend when assigning filters to sprites or containers, chaining effects, optimizing filterArea, or integrating pixi-filters presets.
Is pixijs-filters safe to install?
It documents rendering APIs only; review the Security Audits panel on this Prism page before installing skill packages from third-party repos.
SKILL.md
READMESKILL.md - Pixijs Filters
Attach visual effects by assigning one filter (or an array for chaining) to `container.filters`. Built-in filters cover blur, color matrix, displacement, alpha, and noise; custom filters wrap a GLSL/WGSL fragment shader via `Filter.from(...)`. ## Quick Start ```ts const sprite = new Sprite(await Assets.load("hero.png")); app.stage.addChild(sprite); const blur = new BlurFilter({ strength: 4, quality: 4 }); const colorMatrix = new ColorMatrixFilter(); colorMatrix.brightness(1.2, false); sprite.filters = [blur, colorMatrix]; const container = new Container(); container.filters = [new BlurFilter({ strength: 2 })]; container.filterArea = new Rectangle(0, 0, 800, 600); app.stage.addChild(container); ``` **Related skills:** `pixijs-custom-rendering` (shader internals, uniform types), `pixijs-blend-modes` (composing with filters), `pixijs-performance` (filter tuning, filterArea). ## Core Patterns ### Built-in filters ```ts import { AlphaFilter, BlurFilter, ColorMatrixFilter, DisplacementFilter, NoiseFilter, Assets, Sprite, } from "pixi.js"; // Alpha (uniform transparency without per-child layering) const alpha = new AlphaFilter({ alpha: 0.5 }); // Blur — strength/quality are uniform; strengthX/strengthY split axes; // kernelSize must be odd (5, 7, 9, ... 15); repeatEdgePixels avoids transparent edges const blur = new BlurFilter({ strength: 4, quality: 4, kernelSize: 5, repeatEdgePixels: false, }); // Color matrix — brightness is one of many presets. Others: tint, hue, // contrast, saturate, desaturate, greyscale/grayscale, blackAndWhite, // negative, sepia, technicolor, polaroid, kodachrome, browni, vintage, // colorTone, night, predator, lsd, reset. Direct access via // `colorMatrix.matrix` (20-element array) and `colorMatrix.alpha` (blend // between original and transformed). const colorMatrix = new ColorMatrixFilter(); colorMatrix.brightness(1.5, false); colorMatrix.contrast(0.5, true); // multiply stacks on top of existing matrix colorMatrix.alpha = 0.7; // blend at 70% strength // Displacement — scale is a number or PointData const displacementTexture = await Assets.load("displacement_map.png"); const displacementSprite = new Sprite(displacementTexture); const displacement = new DisplacementFilter({ sprite: displacementSprite, scale: { x: 20, y: 10 }, }); // Noise — seed is an arbitrary number that determines the noise pattern; same seed reproduces the same pattern const noise = new NoiseFilter({ noise: 0.5, seed: Math.random() }); sprite.filters = [blur, colorMatrix]; ``` ### Custom filter with Filter.from() The simplest way to create a custom filter. Only a fragment shader is needed; PixiJS provides a default vertex shader. ```ts import { Filter } from "pixi.js"; const filter = Filter.from({ gl: { fragment: ` in vec2 vTextureCoord; out vec4 finalColor; uniform sampler2D uTexture; uniform float uTime; void main() { vec2 uv = vTextureCoord; uv.x += sin(uv.y * 10.0 + uTime) * 0.02; finalColor = texture(uTexture, uv); } `, }, resources: { timeUniforms: { uTime: { value: 0, type: "f32" }, }, }, }); sprite.filters = filter; app.ticker.add((ticker) => { filter.resources.timeUniforms.uniforms.uTime += 0.04 * ticker.deltaTime; }); ``` For more control, construct `GlProgram`/`GpuProgram` objects directly