
Pixijs Blend Modes
Set container.blendMode on PixiJS v8 display objects for additive glows, multiply shadows, erase masks, and advanced filter-based modes.
Overview
PixiJS Blend Modes is an agent skill for the Build phase that configures PixiJS v8 standard and advanced blendMode compositing with batching-aware ordering.
Install
npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-blend-modesWhat is this skill?
- Standard modes: normal, add, multiply, screen, erase, min, max on sprites and containers
- Advanced modes via `import "pixi.js/advanced-blend-modes"` (color-burn, overlay, hard-light, etc.)
- Batch-friendly guidance: group siblings sharing the same blendMode
- Links to pixijs-filters, pixijs-performance, and pixijs-color related skills
- Quick-start snippets for add, multiply, and color-burn layering
- 7 standard modes named: normal, add, multiply, screen, erase, min, max
- Advanced modes require separate pixi.js/advanced-blend-modes import
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 Pixi layers look flat or washed out because you are not using add, multiply, screen, erase, or advanced overlay modes correctly.
Who is it for?
Indie games and interactive graphics needing additive lighting, multiply shadows, or advanced blend presets in Pixi v8.
Skip if: Project scaffolding, shader authoring from scratch, or unrelated CSS blend on DOM—Pixi display-object pipeline only.
When should I use this skill?
User works on blendMode, additive, multiply, screen, overlay, color-burn, advanced-blend-modes, glow, or erase in PixiJS v8.
What do I get? / Deliverables
Sprites and containers composite with the intended glow, shadow, or overlay look while you know when to import advanced-blend-modes and batch by mode.
- Correct blendMode assignments
- Batch-friendly sibling grouping pattern
Recommended Skills
Journey fit
Build/frontend is where compositing and visual layering happen during scene implementation. Covers GPU standard modes plus pixi.js/advanced-blend-modes import for overlay-style effects during asset integration.
How it compares
Rendering compositing reference—not a full filter pack or particle system skill.
Common Questions / FAQ
Who is pixijs-blend-modes for?
Builders already running PixiJS v8 who need correct blendMode strings and advanced-mode imports for visual effects.
When should I use pixijs-blend-modes?
During Build/frontend when implementing glow (add), darkening (multiply), cutouts (erase), or color-burn overlays on sprites and containers.
Is pixijs-blend-modes safe to install?
It is documentation-only procedural knowledge; review the Security Audits panel on this page like any community skill before agent auto-apply.
SKILL.md
READMESKILL.md - Pixijs Blend Modes
Set `container.blendMode` to composite display objects with GPU blend equations (standard modes) or filter-based advanced modes. Blend-mode transitions break render batches, so group like-mode siblings together. ## Quick Start ```ts const light = new Sprite(await Assets.load("light.png")); light.blendMode = "add"; app.stage.addChild(light); const shadow = new Sprite(await Assets.load("shadow.png")); shadow.blendMode = "multiply"; app.stage.addChild(shadow); import "pixi.js/advanced-blend-modes"; const overlay = new Sprite(await Assets.load("overlay.png")); overlay.blendMode = "color-burn"; app.stage.addChild(overlay); ``` **Related skills:** `pixijs-filters` (advanced modes use the filter pipeline), `pixijs-performance` (batching with blend modes), `pixijs-color` (color manipulation). ## Core Patterns ### Standard blend modes Standard modes are built in and use GPU blend equations directly: ```ts import { Sprite } from "pixi.js"; sprite.blendMode = "normal"; // standard alpha compositing (effective default at root) sprite.blendMode = "add"; // additive (lighten, glow effects) sprite.blendMode = "multiply"; // multiply (darken, shadow effects) sprite.blendMode = "screen"; // screen (lighten, dodge effects) sprite.blendMode = "erase"; // erase pixels from render target sprite.blendMode = "none"; // no blending, overwrites destination sprite.blendMode = "inherit"; // inherit from parent (this is the actual default value) sprite.blendMode = "min"; // keeps minimum of source and destination (WebGL2+ only) sprite.blendMode = "max"; // keeps maximum of source and destination (WebGL2+ only) ``` These are hardware-accelerated and cheap. They do not require filters. ### Advanced blend modes Advanced modes require an explicit import to register the extensions. On the WebGL renderer they also require `useBackBuffer: true` at init time, or PixiJS logs a warning and the blend silently falls back: ```ts import "pixi.js/advanced-blend-modes"; import { Application, Sprite, Assets } from "pixi.js"; const app = new Application(); await app.init({ useBackBuffer: true }); // required for advanced modes on WebGL const texture = await Assets.load("overlay.png"); const overlay = new Sprite(texture); overlay.blendMode = "color-burn"; ``` Available advanced modes: | Mode | Effect | | -------------- | ----------------------------------------------- | | `color-burn` | Darkens by increasing contrast | | `color-dodge` | Brightens by decreasing contrast | | `darken` | Keeps darker of two layers | | `difference` | Absolute difference | | `divide` | Divides bottom by top | | `exclusion` | Similar to difference, lower contrast | | `hard-light` | Multiply or screen based on top layer | | `hard-mix` | High contrast threshold blend | | `lighten` | Keeps lighter of two layers | | `linear-burn` | Adds and subtracts to darken | | `linear-dodge` | Adds layers together | | `linear-light` | Linear burn or dodge based on top layer | | `luminosity` | Luminosity of top, hue/saturation of bottom | | `negation` | Inverted difference | | `overlay` | Multiply or screen based on bottom layer | | `pin-light` | Replaces based on lightness comparison | | `saturation