Open1kJ/PanningCamera/background.gdshader

15 lines
384 B
Plaintext
Raw Permalink Normal View History

2024-02-26 12:07:49 -06:00
shader_type canvas_item;
const float y_speed = 0.5 / 3.0;
const float x_speed = 0.1 / 3.0;
void fragment() {
vec2 new_uv = vec2(UV.x + TIME * x_speed, UV.y + TIME * y_speed);
COLOR = texture(TEXTURE, new_uv);
}
//void light() {
// Called for every pixel for every light affecting the CanvasItem.
// Uncomment to replace the default light processing function with this one.
//}