Frosty Rotative Deformation
This shader has to be applied directly on a sprite or colorrect. It uses a noise texture to perform a deformation of the texture.
The uniform **noise** must be a noise texture, set as a normal map and with precise value (see screenshot down below).
Shader code
shader_type canvas_item;
uniform sampler2D noise;
void fragment() {
float angle = TIME;
vec2 dist = vec2(.5) - UV;
float s = sin(angle);
float c = cos(angle);
mat2 m = mat2(vec2(c, -s), vec2(s, c));
dist *= m;
vec4 coord = texture(noise, dist);
coord.x -= .5;
coord.y -= .5;
vec4 lens_color = texture(TEXTURE, UV + coord.xy);
COLOR = lens_color;
}
This also serves to get a very convincing shader effect underwater by editing the parameters correctly.
Thanks for this.