mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
added moving backround
This commit is contained in:
13
Nodes/game.gdshader
Normal file
13
Nodes/game.gdshader
Normal file
@@ -0,0 +1,13 @@
|
||||
shader_type spatial;
|
||||
render_mode unshaded;
|
||||
|
||||
uniform vec2 direction_and_speed = vec2(0.25, 0.00);
|
||||
uniform vec2 scale = vec2(1.0);
|
||||
uniform bool flip = false;
|
||||
uniform sampler2D albedo;
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = UV * scale - direction_and_speed * TIME;
|
||||
if (flip) { uv = 1.0 - uv; }
|
||||
ALBEDO = texture(albedo, uv).rgb;
|
||||
}
|
||||
Reference in New Issue
Block a user