summaryrefslogtreecommitdiff
path: root/UI/sliding_background.gdshader
blob: cf42b61536cdc9c7a074496e306fbe4bb3ead0fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
shader_type canvas_item;

uniform sampler2D pattern_sampler : repeat_enable, filter_nearest;
uniform vec3 bg_color : source_color;
uniform vec3 pattern_color : source_color;
uniform float pattern_size = 256.0;
uniform float speed = 0.05;

void fragment() {
	vec2 uv = FRAGCOORD.xy / pattern_size;
	COLOR.rgb = mix(pattern_color, bg_color, texture(pattern_sampler, uv + TIME * speed).x);
}