From 84365b6f901a9c0251a9f724a8d9f81a3787e97d Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 3 Nov 2024 14:10:07 +0100 Subject: next commit --- UI/sliding_background.gdshader | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 UI/sliding_background.gdshader (limited to 'UI/sliding_background.gdshader') 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); +} -- cgit v1.2.3