pixijs-blend-modes

Configure PixiJS display object blend modes with GPU blend equations.

16|8|Updated May 20, 2020
One-click install
npx skills add https://github.com/encounterplus/web-client --skill pixijs-blend-modes-encounterplus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixijs-blend-modes
Source: https://github.com/encounterplus/web-client/tree/main/.agents/skills/pixijs-blend-modes
Command: npx skills add https://github.com/encounterplus/web-client --skill pixijs-blend-modes-encounterplus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Correctly compositing PixiJS display objects using blend modes so visuals match the intended artistic result without unexpected fallbacks or performance regressions.

Core Features & Use Cases

  • Standard GPU blend modes: Set common blend modes like normal, add, multiply, screen, erase, min, and max directly via sprite or container blendMode.
  • Advanced blend modes via extension: Enable modes like color-burn, overlay, hard-light, and others by importing pixi.js/advanced-blend-modes and using the proper renderer initialization.
  • Batch-friendly ordering: Arrange children to reduce draw-call churn caused by switching between blend modes.

Quick Start

In a PixiJS v8 scene, import the required advanced-blend-modes extension when using modes like color-burn, enable useBackBuffer on WebGL init, and set each sprite’s blendMode to the intended string value.

Frequently Asked Questions about pixijs-blend-modes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply blend modes in PixiJS for additive glow and multiply shadows?

To apply PixiJS blend modes for additive glow or multiply shadows, set the sprite or container blendMode property to string values like add or multiply, enabling correct GPU compositing for artistic layering. Organize siblings by blendMode to minimize render batch breaks.

Why do advanced blend modes like overlay and hard-light require a back buffer in WebGL?

Advanced PixiJS blend modes like overlay and hard-light require a WebGL back buffer because the renderer must read existing pixel values to calculate complex compositing equations. Initialize WebGL with useBackBuffer: true to enable these advanced GPU blending operations correctly.

Do I need to import a specific extension to use color-burn and overlay blend modes in PixiJS v8?

Yes, to use advanced PixiJS blend modes like color-burn and overlay, you must import pixi.js/advanced-blend-modes and initialize the WebGL renderer with useBackBuffer: true, allowing the GPU to execute complex color compositing equations properly.

What is the best way to organize PixiJS display objects to avoid render batch breaks from blend modes?

The best way to avoid render batch breaks in PixiJS is organizing display object siblings by their blendMode, reducing draw-call churn caused by switching between different GPU compositing states during scene layering.

Can I use standard blend modes like screen and erase without enabling the WebGL back buffer?

Yes, standard PixiJS GPU blend modes like normal, add, multiply, screen, erase, min, and max work without the back buffer by setting the blendMode property directly, while advanced artistic blends require the extension and back buffer initialization.