This commit is contained in:
pennyrigate 2024-07-11 16:57:30 -04:00
parent a6374aa311
commit 8a3fc9be82
4 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,17 @@
shader_type canvas_item;
uniform bool animate_noise = false;
uniform float noise_intensity = 1.0;
float random (vec2 uv) {
return fract(sin(dot(uv.xy,
vec2(12.9898,78.233))) * 43758.5453123);
}
void fragment() {
vec2 noise_uv = SCREEN_UV + fract(TIME) * float(animate_noise) / 10.0;
float noise = random(noise_uv);
noise = mix(1.0 - noise_intensity, 1.0, noise);
COLOR = vec4(COLOR.rgb * noise, COLOR.a);
}