Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Display
/
Shaders
Phaser 4.1.0
Phaser 4 examples
Shaders
5
examples
Examples
5
GLSL Shader with Camera Mask
Demonstrates applying a GLSL fragment shader to the background with real-time uniform updates while using internal camera filters to add a grunge mask effect.
Loading and Manipulating Shaders
Demonstrates how to load GLSL fragment shaders, pass uniforms from the game loop, and treat shader objects as GameObjects that can be tweened, scaled, and moved via input.
Shader and Camera Masking
Demonstrates applying different masks to both the main camera and an individual shader object simultaneously, while passing time uniforms to the fragment shader.
Shader Uniforms and Animation
Demonstrates how to load a custom fragment shader and pass dynamic data, such as time, to it using the setupUniforms callback.
Shader with Bitmap Mask
Demonstrates applying an image-based bitmap mask to a shader. The example features a dynamic fragment shader that follows the mouse pointer while being constrained to the shape of a mask.