v4-new-features

Documents new Phaser 4 rendering features including Filters, RenderNodes, and GPU layers.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/onemanking/the-operator --skill v4-new-features-onemanking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: v4-new-features
Source: https://github.com/onemanking/the-operator/tree/main/.github/skills/v4-new-features
Command: npx skills add https://github.com/onemanking/the-operator --skill v4-new-features-onemanking

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Phaser 4 replaces the v3 rendering architecture (Pipelines, FX, BitmapMask) with a new RenderNode graph and Filters system, leaving developers unsure which APIs to use for effects, lighting, tinting, and high-performance rendering. ## Core Features & Use Cases - Filters and RenderNodes: Apply internal/external filters to any game object and override render node roles for custom rendering behavior. - New Game Objects: Use CaptureFrame, Gradient, Noise variants, SpriteGPULayer, and TilemapGPULayer for framebuffer capture, procedural visuals, and massive GPU-batched rendering. - Lighting and Tint Modes: Enable per-object lighting with self-shadowing and choose from six tint modes including FILL, ADD, SCREEN, and OVERLAY. - Use Case: When building a Phaser 4 scene that needs a glowing sprite, a radial gradient background, and a million-particle GPU layer, consult this skill for the correct v4 APIs and code patterns. ## Quick Start Ask how to add a glow filter and lighting to a sprite in Phaser 4 and apply the provided code examples to your scene.

Frequently Asked Questions about v4-new-features

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

FAQPage Schema
How do I add glow or blur effects to a sprite in Phaser 4?

Phaser 4 replaces the v3 FX system with Filters. Call sprite.enableFilters(), then use sprite.filters.internal.addGlow() or sprite.filters.external.addBlur(). Internal filters run in object-local space; external filters run in screen space.

What replaced Pipelines in Phaser 4?

Pipelines are replaced by RenderNodes, where each node handles a single rendering task via a run() method. Game objects reference nodes through role-based maps, and you can override roles with gameObject.setRenderNodeRole().

Does Phaser 4 support 2D lighting on sprites?

Yes, Phaser 4 adds a Lighting component enabled via sprite.setLighting(true), replacing the v3 setPipeline('Light2D') approach. It also supports self-shadowing through setSelfShadow() with penumbra and diffuse threshold parameters.

How do I render thousands of sprites efficiently in Phaser 4?

Use SpriteGPULayer, which renders up to millions of quads in a single draw call from a static GPU buffer. Populate members once at creation since buffer updates are expensive, and hide members by setting scale or alpha to zero.

What are the limitations of TilemapGPULayer in Phaser 4?

TilemapGPULayer supports only a single tileset with one texture, orthographic maps, and a maximum of 4096x4096 tiles. Editing tiles at runtime requires a manual generateLayerDataTexture() call to update the GPU data.

Why does setTintFill not work in Phaser 4?

setTintFill() is a deprecated no-op in Phaser 4 that only logs a console error. Instead, call setTint() to set the color and setTintMode(Phaser.TintModes.FILL) to choose the fill mode separately.