Simple noise overlay
Noise Texture overlay on top of Texture.
—
Usage Instructions:
– use this shader on a Texture
– use noiseTexture with var noise
Shader code
shader_type canvas_item;
uniform vec2 direction = vec2(1, 0);
uniform float speed = 0.1;
uniform sampler2D noise;
vec4 overlay(vec4 base, vec4 blend){
vec4 limit = step(0.5, base);
return mix(2.0 * base * blend, 1.0 - 2.0 * (1.0 - base) * (1.0 - blend), limit);
}
void fragment()
{
// image texture
vec4 base = texture(TEXTURE, UV);
// noise texture
vec4 blend = texture(noise, UV + ( direction * speed * TIME));
COLOR = overlay(base, blend);
}
Cool shader
Excellent shader. Gif doesn’t do it justice. I personally used it for some status orbs which felt static, now they feel mystical