[gd_scene load_steps=14 format=3 uid="uid://df3ur5wll8vx7"] [ext_resource type="PackedScene" uid="uid://4j1tlhfm3p40" path="res://base-environments/transition/subway_train.tscn" id="1_2h2xx"] [ext_resource type="Script" uid="uid://dgfje4druu3sw" path="res://base-environments/transition/code/dolly.gd" id="1_5jpg8"] [sub_resource type="Shader" id="Shader_tpaj8"] code = "shader_type spatial; render_mode depth_prepass_alpha; uniform float time; uniform sampler2D horizontal_gradient: repeat_disable; uniform sampler2D horizontal_emission: repeat_disable; uniform sampler2D vertical_gradient: repeat_disable; uniform sampler2D vertical_emission: repeat_disable; void vertex() { // Called for every vertex the material is visible on. } void fragment() { float anim_progress = time; //float anim_progress = fract(TIME * 0.25); ALBEDO = texture(horizontal_gradient, UV.yx).xyz * mix(vec3(1.0), texture(vertical_gradient, UV * vec2(anim_progress)).xyz, anim_progress); ALPHA = min(clamp(3.0-anim_progress*2.0, 0.0, 1.0), texture(horizontal_gradient, UV.yx).w * texture(vertical_gradient, UV).w * pow(anim_progress, 0.6)); EMISSION = texture(horizontal_emission, UV.yx).xyz * mix(vec3(1.0), texture(vertical_emission, UV * vec2(anim_progress)).xyz, min(1.0, anim_progress)); ROUGHNESS = 0.5; SPECULAR = 0.4; METALLIC = 0.3; } //void light() { // // Called for every pixel for every light affecting the material. // // Uncomment to replace the default light processing function with this one. //} " [sub_resource type="Gradient" id="Gradient_sofnd"] offsets = PackedFloat32Array(0.190283, 0.237517, 0.252362, 0.263158, 0.358974, 0.620783) colors = PackedColorArray(0, 0, 0, 1, 0.498876, 0.371803, 0.25703, 1, 0.999199, 0.798087, 0.641907, 1, 0.552793, 0.341064, 0.190397, 1, 0.428199, 0.393103, 0.309389, 1, 0, 0, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_bjefl"] gradient = SubResource("Gradient_sofnd") [sub_resource type="Gradient" id="Gradient_csq32"] offsets = PackedFloat32Array(0, 0.0526316, 0.165992, 0.62753, 0.647773, 0.704453, 0.731444, 1) colors = PackedColorArray(0.0563103, 0.372397, 0.669528, 1, 0, 0, 0, 0.968627, 0.0844204, 0.319764, 0.485866, 0.796078, 0.0554195, 0.372493, 0.670199, 0.871024, 0, 0, 0, 0.933333, 0.0507, 0.237315, 0.39, 1, 0.0563103, 0.372397, 0.669528, 1, 0.0261, 0.092075, 0.29, 0.894118) [sub_resource type="GradientTexture1D" id="GradientTexture1D_tpaj8"] gradient = SubResource("Gradient_csq32") width = 1024 [sub_resource type="Gradient" id="Gradient_grftg"] offsets = PackedFloat32Array(0.147099, 0.159244, 0.195682, 0.213225, 0.267206, 0.287449, 0.31444, 0.34143, 0.364372, 0.398111, 0.430499, 0.442645, 0.480432, 0.511471, 1) colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0.194349, 0.194349, 0.194349, 1, 0.194349, 0.194349, 0.194349, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_v43sq"] gradient = SubResource("Gradient_grftg") [sub_resource type="Gradient" id="Gradient_l33v1"] offsets = PackedFloat32Array(0.022942, 0.11471, 0.2045054, 0.21741071, 0.25024083, 0.26036772, 0.438596, 0.45614, 0.473684, 0.866397, 1) colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0.0820244, 0.0820244, 0.0820244, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0) [sub_resource type="GradientTexture1D" id="GradientTexture1D_nnax0"] gradient = SubResource("Gradient_l33v1") [sub_resource type="ShaderMaterial" id="ShaderMaterial_0vobo"] render_priority = 1 shader = SubResource("Shader_tpaj8") shader_parameter/time = 0.0 shader_parameter/horizontal_gradient = SubResource("GradientTexture1D_tpaj8") shader_parameter/horizontal_emission = SubResource("GradientTexture1D_bjefl") shader_parameter/vertical_gradient = SubResource("GradientTexture1D_nnax0") shader_parameter/vertical_emission = SubResource("GradientTexture1D_v43sq") [sub_resource type="QuadMesh" id="QuadMesh_ppxbm"] [node name="TrainDolly" type="Node3D"] script = ExtResource("1_5jpg8") [node name="West" type="Node3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 130) [node name="East" type="Node3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -130) [node name="Train" type="Node3D" parent="."] transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0, 0, 0) [node name="subway_train" parent="Train" instance=ExtResource("1_2h2xx")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7804413, 0, 0) [node name="MeshInstance3D8" type="MeshInstance3D" parent="Train"] transform = Transform3D(-42.01, 4.0756225e-07, 4.3401164e-07, -6.330816e-06, -2.8743172, -0.1808367, -5.9450595e-06, 0.1808367, -2.8743172, -3.9468384, 1.286, 2.488358) visible = false material_override = SubResource("ShaderMaterial_0vobo") mesh = SubResource("QuadMesh_ppxbm") skeleton = NodePath("../../../GPUParticles3D4")