2D reflective ice

Add this to a tile, or sprite, under the shader parameters, add the ice texture.

Shader code
shader_type canvas_item;

uniform sampler2D Tile;

void fragment() {
// Texture:2
	vec4 ref = texture(SCREEN_TEXTURE, vec2(SCREEN_UV.x, 1.0 - SCREEN_UV.y - 0.13));
	vec4 ice = texture(Tile, UV.xy);

// Output:0
	COLOR = ice/2.0 + ref/2.0;
Ice, mirror, side scroller
The shader code and all code snippets in this post are under MIT license and can be used freely. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from SamWise

Simple 3D Glass

Simple 3D Metal

Related shaders

2D Reflective Water

Spatial Ice Shader

Parallax Ice | Depth effect

Notify of

Inline Feedbacks
View all comments