render-textures

Draws game objects to off-screen RenderTexture and DynamicTexture surfaces in Phaser 4.

Updated Sep 20, 2026
One-click install
npx skills add https://github.com/AmirOssanloo/helix-game --skill render-textures-amirossanloo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: render-textures
Source: https://github.com/AmirOssanloo/helix-game/tree/main/.claude/skills/render-textures
Command: npx skills add https://github.com/AmirOssanloo/helix-game --skill render-textures-amirossanloo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Phaser 4's texture-drawing API uses a command-buffer architecture that differs from earlier versions, so developers often struggle with invisible output, incorrect camera transforms, and confusion between RenderTexture, DynamicTexture, and the Stamp game object. This Skill provides the correct patterns for off-screen rendering, compositing, and pixel capture. ## Core Features & Use Cases - RenderTexture and DynamicTexture guidance: Explains when to use a visible RenderTexture game object versus a shared DynamicTexture in the Texture Manager, including the mandatory render() flush and renderMode options. - Drawing operations: Covers draw, stamp, capture, fill, clear, erase, repeat, and snapshot methods with correct parameters and transform configs. - Use Case: Build a live minimap by creating a RenderTexture with setScrollFactor(0), renderMode 'all', and preserve(true), then capturing scaled-down world objects each frame. ## Quick Start Ask the AI to create a Phaser 4 RenderTexture that draws a sprite to an off-screen texture and registers it with saveTexture so other game objects can use it.

Frequently Asked Questions about render-textures

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

FAQPage Schema
How do I draw a sprite to a RenderTexture in Phaser 4?▼

Create one with this.add.renderTexture(x, y, w, h), call rt.draw(sprite, x, y), then call rt.render() to flush the command buffer. In Phaser 4, drawing calls are buffered and nothing appears until render() executes.

What is the difference between RenderTexture and DynamicTexture in Phaser?▼

RenderTexture is a visible Image game object with its own auto-created DynamicTexture, while DynamicTexture is a shared texture in the Texture Manager with no position or display. Use DynamicTexture when multiple objects share a generated texture or you need cross-scene access.

Why is my RenderTexture blank after calling draw in Phaser 4?▼

Phaser 4 buffers draw, fill, and stamp commands instead of executing them immediately. You must call render() to flush the buffer, or set renderMode to 'redraw' or 'all' for automatic per-frame rendering.

Can I use a RenderTexture as a texture for other game objects?▼

Yes, call rt.saveTexture('key') to register it in the Texture Manager, then any image or sprite can use that key. Note that saveTexture renames rather than copies, and destroying the RenderTexture without saving destroys the texture.

Are RenderTexture snapshots expensive in Phaser?▼

Yes, snapshots use readPixels in WebGL, which blocks the GPU pipeline, so avoid per-frame snapshot calls. snapshotPixel is cheaper than a full snapshot, and contents are also lost on WebGL context loss.