add scrolling bg + fix tile data
This commit is contained in:
14
PanningCamera/background.gdshader
Normal file
14
PanningCamera/background.gdshader
Normal file
@@ -0,0 +1,14 @@
|
||||
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.
|
||||
//}
|
Reference in New Issue
Block a user