diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-11-03 14:10:07 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-11-03 14:10:07 +0100 |
commit | 84365b6f901a9c0251a9f724a8d9f81a3787e97d (patch) | |
tree | 401e2bf99e6573d1d069f5044e7448067cdfb384 /UI/sliding_background.gdshader | |
parent | a43499efa6c228cea3633f9661f3ff09127bd82d (diff) |
next commit
Diffstat (limited to 'UI/sliding_background.gdshader')
-rw-r--r-- | UI/sliding_background.gdshader | 12 |
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); +} |