Yoshi’s Island Shimmer – Heat Haze Distortion

This is a simple yet powerful post-processing shader adapted for Godot’s CanvasItem that applies a subtle, persistent distortion or wobble to the entire screen. This effect is ideal for simulating heat haze, liquid surfaces, magical aura, or the “shimmering” effect often used for visual feedback (like a character getting a power-up or, as noted, a “Yoshi dancing” effect).

The core effect is achieved by:

  1. Noise Flow: The UV coordinates for the noise_texture are animated over time, creating continuous, seamless motion.

  2. Distortion Map: The red (x) and green (y) channels of the sampled noise are used to create a 2D offset vector.

  3. Screen Warp: This offset vector is scaled by the strength uniform and added to the SCREEN_UV, causing the final image to subtly warp and distort based on the flowing noise pattern.

 

Adjustable Uniforms (Shader Parameters):

 

Parameter Type Description
noise_texture sampler2D Required Input: A seamless noise texture (e.g., Perlin, Simplex) used as the source for the distortion map.
strength float Controls the intensity of the distortion (how much the screen warps). Keep this value very low (e.g., < 0.01).
speed vec2 Controls the speed and direction of the noise pattern’s movement over time.
SCREEN_TEXTURE sampler2D Required Input: Provides the image of the scene to be distorted.
Shader code
shader_type canvas_item;

uniform sampler2D noise_texture : source_color, repeat_enable;
uniform float strength : hint_range(0.0, 0.05, 0.001) = 0.005;
uniform vec2 speed = vec2(0.1, 0.05);
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;


void fragment() {
    vec2 noise_uv = UV + TIME * speed;

    vec2 offset = (texture(noise_texture, noise_uv).xy * 2.0 - 1.0);

    offset *= strength;
 vec2 distorted_uv = SCREEN_UV + offset;
    
    COLOR = texture(SCREEN_TEXTURE, distorted_uv);
}
Tags
animated, distortion, godotshader, HeatHaze, liquid, noise, postprocess, retro, ScreenEffect, snes, warp, YoshiIsland
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from Gerardo LCDF

Abstract 3D

Volumetric Cosmic Dust

Star Wars-Style 3D Hologram Shader

Related shaders

Heat haze Shader

Heat beat monitor (godot 4)

Barrel distortion

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments