SupaLidlGame/Shaders/Scrolling.gdshader

12 lines
272 B
Plaintext
Raw Normal View History

2023-09-07 11:53:51 -07:00
shader_type canvas_item;
2023-09-10 09:37:12 -07:00
render_mode blend_mix;
2023-09-07 11:53:51 -07:00
uniform float speed = 16;
uniform vec2 direction = vec2(1, 0);
2023-09-10 09:37:12 -07:00
uniform vec4 tint_color : source_color;
2023-09-07 11:53:51 -07:00
void fragment() {
2023-09-10 09:37:12 -07:00
vec4 color = texture(TEXTURE, UV - direction * TIME * speed);
COLOR = color * tint_color;
2023-09-07 11:53:51 -07:00
}