summaryrefslogtreecommitdiff
path: root/UI/sliding_background.gdshader
diff options
context:
space:
mode:
Diffstat (limited to 'UI/sliding_background.gdshader')
-rw-r--r--UI/sliding_background.gdshader12
1 files changed, 12 insertions, 0 deletions
diff --git a/UI/sliding_background.gdshader b/UI/sliding_background.gdshader
new file mode 100644
index 0000000..cf42b61
--- /dev/null
+++ b/UI/sliding_background.gdshader
@@ -0,0 +1,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);
+}