Animated Noise and Sprite Mixer

Mixes noise with a sprite, and animates it alittle bit.

rjljones

 

 
Shader code
shader_type canvas_item;

uniform float speed = 100.0;
uniform sampler2D noise;
uniform vec4 color: source_color = vec4(1,1,1,1);
uniform vec4 color2: source_color = vec4(1,1,1,1);
uniform float intensity = 1;
uniform float alpha: hint_range(0.0, 1.0, 0.1) = 0;
uniform float brightness = 2;
//
void fragment()
{
	// image texture
	vec4 base = texture(TEXTURE, UV);
	// noise texture
	base *= color;
	//vec4 blend = texture(noise, UV + ( direction * speed * TIME));
	vec3 noisy = texture(noise, UV + (vec2( sin(TIME), -sin(TIME) ) / speed)).rbg;
	noisy *= color2.rbg;
	//vec2 noise_mix = mix(UV, noisy.xy, 1);
	COLOR = vec4((base.rbg) * (noisy * ( (sin(TIME) / intensity) + brightness)), base.a - alpha);
}
Tags
2d, canvas, noise, sprite
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 grimbeef

Combustible Voronoi with Parameters

Nebula Stars Clouds

Related shaders

Animated and Gradient Outlines

Texture based overlay (animated)

Animated Diamond Pattern

Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Rosebloom
Rosebloom
5 months ago

Thanks!