forked from team-sg/hero-mark-2
import
This commit is contained in:
parent
a6374aa311
commit
8a3fc9be82
4 changed files with 82 additions and 0 deletions
17
shaders/noise_slow.gdshader
Normal file
17
shaders/noise_slow.gdshader
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue