12345678910111213141516171819202122232425262728 |
- [gd_scene load_steps=4 format=2]
-
- [ext_resource path="res://mini-game/scripts/ScrollingBG.gd" type="Script" id=1]
-
- [sub_resource type="Shader" id=1]
- code = "shader_type canvas_item;
-
- uniform float scroll_speed;
-
- void fragment(){
- vec2 u = UV;
- u.x += scroll_speed*TIME;
- vec4 color = texture(TEXTURE,u);
- COLOR = color;
- }
- "
-
- [sub_resource type="ShaderMaterial" id=2]
- shader = SubResource( 1 )
- shader_param/scroll_speed = 0.2
-
- [node name="ScrollingBG" type="TextureRect"]
- material = SubResource( 2 )
- stretch_mode = 2
- script = ExtResource( 1 )
- __meta__ = {
- "_edit_use_anchors_": false
- }
|