Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Game Objects
/
Shader
Phaser 4.1.0
Phaser 4 examples
Shader
9
examples
Examples
9
Custom Shader Texture Coordinates
Demonstrates how to apply a custom shader to a specific frame from a texture atlas using setTextureCoordinatesFromFrame and building shaders using modular additions.
Gradient Circle Wipe Mask
Demonstrates creating a radial transition between two images by using a dynamic shader as a mask, with the circle's radius controlled by the distance of the pointer from the center.
Gradient Linear Wipe Mask
Demonstrates how to use a shader-generated linear gradient as a dynamic mask to create a smooth transition between two images controlled by the pointer.
Gradient Ripple Reflection
Demonstrates how to use a procedurally generated gradient shader as a displacement map to create a dynamic water ripple effect on a reflected scene.
Gradient Shine
Create an animated gradient shine effect by combining modular shader additions with normal map displacement and additive blending.
Linear Gradient Shader
Demonstrates creating a linear gradient using the Shader Game Object by composing multiple GLSL fragments and configuring uniforms for positions, colors, and step counts.
Perlin Noise Custom Shader Displacement
Demonstrates how to inject custom GLSL code into a shader using shader additions to generate Perlin noise. The resulting shader is rendered to a texture and applied as a real-time displacement filter to an image.
Random Noise Shader Additions
Demonstrates how to use the shaderAdditions property to inject custom GLSL code into the default fragment shader, creating dynamic noise effects with time-based uniforms.
Shader Bilinear Gradient Displacement
Create complex background effects by combining modular shader additions, render-to-texture, and displacement filters using bilinear and linear gradients.