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;
}
Tags
deformation, noise
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 CasualGarageCoder

Blast Wall

Water-like wavelet

Swirl/Sink

Related shaders

Stylized grass with wind and deformation

Play with Furcifer sprite deformation shader

Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Torguen
Torguen
1 year ago

This also serves to get a very convincing shader effect underwater by editing the parameters correctly.

Thanks for this.