You've got boost power!!

This commit is contained in:
Rob Kelly 2024-07-23 00:25:13 -06:00
parent 3b526fe84a
commit 46dc536f5b
7 changed files with 302 additions and 77 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=30 format=3 uid="uid://dd7ebaau8a70n"]
[gd_scene load_steps=33 format=3 uid="uid://dd7ebaau8a70n"]
[ext_resource type="PackedScene" uid="uid://fyy7y5h5iv1g" path="res://assets/models/bipedal_mech/scene.gltf" id="1_1xwab"]
[ext_resource type="Animation" uid="uid://c0h2wkp2w2akg" path="res://assets/models/bipedal_mech/animations/cockpit_open.tres" id="2_puxwb"]
@ -859,6 +859,16 @@ input_1/name = "air"
input_1/auto_advance = true
input_1/reset = true
[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_7s6d8"]
fadein_time = 0.1
fadeout_time = 0.1
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_q4ale"]
animation = &"jump_start"
play_mode = 1
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_spueh"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mmv50"]
animation = &"jump_start"
@ -909,13 +919,19 @@ blend_point_4/pos = Vector2(-1, 0)
sync = true
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_u1qtb"]
graph_offset = Vector2(355, 11)
graph_offset = Vector2(83.0129, 20.129)
nodes/air_anim/node = SubResource("AnimationNodeAnimation_512j7")
nodes/air_anim/position = Vector2(780, 640)
nodes/air_scale/node = SubResource("AnimationNodeTimeScale_o8qjb")
nodes/air_scale/position = Vector2(1040, 620)
nodes/anim_state/node = SubResource("AnimationNodeTransition_je0j1")
nodes/anim_state/position = Vector2(1620, 180)
nodes/anim_state/position = Vector2(1480, 180)
nodes/boost/node = SubResource("AnimationNodeOneShot_7s6d8")
nodes/boost/position = Vector2(1680, 360)
nodes/boost_anim/node = SubResource("AnimationNodeAnimation_q4ale")
nodes/boost_anim/position = Vector2(1300, 600)
nodes/boost_scale/node = SubResource("AnimationNodeTimeScale_spueh")
nodes/boost_scale/position = Vector2(1480, 560)
nodes/jump_start_anim/node = SubResource("AnimationNodeAnimation_mmv50")
nodes/jump_start_anim/position = Vector2(760, 480)
nodes/jump_start_scale/node = SubResource("AnimationNodeTimeScale_xurtg")
@ -931,7 +947,7 @@ nodes/walk_scale/node = SubResource("AnimationNodeTimeScale_cg5gs")
nodes/walk_scale/position = Vector2(900, 220)
nodes/walk_space/node = SubResource("AnimationNodeBlendSpace2D_fl1ps")
nodes/walk_space/position = Vector2(660, 260)
node_connections = [&"air_scale", 0, &"air_anim", &"anim_state", 0, &"walk_scale", &"anim_state", 1, &"jump_state", &"jump_start_scale", 0, &"jump_start_anim", &"jump_state", 0, &"air_scale", &"jump_state", 1, &"landing_scale", &"landing_scale", 0, &"landing_anim", &"output", 0, &"anim_state", &"walk_scale", 0, &"walk_space"]
node_connections = [&"air_scale", 0, &"air_anim", &"anim_state", 0, &"walk_scale", &"anim_state", 1, &"jump_state", &"boost", 0, &"anim_state", &"boost", 1, &"boost_scale", &"boost_scale", 0, &"boost_anim", &"jump_start_scale", 0, &"jump_start_anim", &"jump_state", 0, &"air_scale", &"jump_state", 1, &"landing_scale", &"landing_scale", 0, &"landing_anim", &"output", 0, &"boost", &"walk_scale", 0, &"walk_space"]
[node name="Mech" instance=ExtResource("1_1xwab")]
script = ExtResource("2_u6cpy")
@ -948,6 +964,10 @@ parameters/air_scale/scale = 1.0
parameters/anim_state/current_state = "ground"
parameters/anim_state/transition_request = ""
parameters/anim_state/current_index = 0
parameters/boost/active = false
parameters/boost/internal_active = false
parameters/boost/request = 0
parameters/boost_scale/scale = 0.7
parameters/jump_start_scale/scale = 1.5
parameters/jump_state/current_state = ""
parameters/jump_state/transition_request = "start"
@ -957,43 +977,43 @@ parameters/walk_scale/scale = 1.0
parameters/walk_space/blend_position = Vector2(0, 0)
[node name="Skeleton3D" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5" index="0"]
bones/1/position = Vector3(0, 0, 6.30014)
bones/1/position = Vector3(0, 0, 6.30965)
bones/1/rotation = Quaternion(0.707107, 0, 0, 0.707107)
bones/2/rotation = Quaternion(1.54543e-08, 1.54543e-08, -0.707107, 0.707107)
bones/3/rotation = Quaternion(0.652164, 0.671825, 0.244784, 0.251823)
bones/3/rotation = Quaternion(0.652367, 0.67201, 0.244274, 0.251294)
bones/3/scale = Vector3(1, 1, 1)
bones/4/rotation = Quaternion(0.725761, 0.0543238, 0.0750463, 0.68168)
bones/4/rotation = Quaternion(0.724228, 0.0544998, 0.0749423, 0.683306)
bones/4/scale = Vector3(1, 1, 1)
bones/5/rotation = Quaternion(-0.643275, -0.00110192, -0.104547, 0.758463)
bones/5/rotation = Quaternion(-0.641974, -0.00112317, -0.104355, 0.759591)
bones/5/scale = Vector3(1, 1, 1)
bones/6/rotation = Quaternion(-0.431399, 0.0117786, -0.0625626, 0.899912)
bones/7/rotation = Quaternion(-0.848314, 0.0352934, -0.175886, 0.498178)
bones/6/rotation = Quaternion(-0.431643, 0.0117232, -0.0625202, 0.899799)
bones/7/rotation = Quaternion(-0.846737, 0.0355634, -0.175468, 0.500982)
bones/7/scale = Vector3(1, 1, 1)
bones/9/rotation = Quaternion(-0.577893, -0.0977404, -0.0868737, 0.805568)
bones/11/rotation = Quaternion(-0.844877, 0.0418286, -0.171439, 0.505017)
bones/11/rotation = Quaternion(-0.843264, 0.0421208, -0.170997, 0.50783)
bones/11/scale = Vector3(1, 1, 1)
bones/13/rotation = Quaternion(-0.583833, -0.0928994, -0.0936977, 0.80108)
bones/13/scale = Vector3(1, 1, 1)
bones/15/rotation = Quaternion(0.993231, -0.0067672, 0.0811647, 0.0828119)
bones/15/scale = Vector3(1, 1, 1)
bones/17/rotation = Quaternion(0.751423, 0.0197084, 0.659077, 0.0243283)
bones/17/rotation = Quaternion(0.751537, 0.016959, 0.659159, 0.0203588)
bones/17/scale = Vector3(1, 1, 1)
bones/19/rotation = Quaternion(-0.399104, -0.525183, -0.304683, 0.687072)
bones/19/scale = Vector3(0.999999, 1, 1)
bones/21/rotation = Quaternion(0.855906, -0.0322478, 0.0593455, 0.512701)
bones/23/rotation = Quaternion(0.880638, 0.00347096, 0.145334, 0.450935)
bones/23/rotation = Quaternion(0.881155, 0.00323519, 0.14553, 0.449862)
bones/23/scale = Vector3(1, 1, 1)
bones/25/rotation = Quaternion(-0.715396, -0.0713077, -0.0634678, 0.692168)
bones/25/scale = Vector3(1, 1, 1)
bones/27/rotation = Quaternion(-0.585151, -0.00523809, -0.107411, 0.803762)
bones/27/rotation = Quaternion(-0.583306, -0.00526912, -0.107153, 0.805136)
bones/29/rotation = Quaternion(0.808854, -0.0303334, 0.0651724, 0.583599)
bones/31/rotation = Quaternion(0.808854, -0.0303334, 0.0651724, 0.583599)
bones/33/rotation = Quaternion(-0.577591, -0.00930922, -0.112415, 0.808495)
bones/35/rotation = Quaternion(-0.664853, 0.00404164, -0.107758, 0.73915)
bones/33/rotation = Quaternion(-0.575728, -0.00934441, -0.112159, 0.809858)
bones/35/rotation = Quaternion(-0.662964, 0.00401885, -0.107476, 0.740886)
bones/35/scale = Vector3(1, 1, 1)
bones/37/scale = Vector3(1, 1, 1)
bones/39/scale = Vector3(1, 1, 1)
bones/41/rotation = Quaternion(-0.0149888, 0.93956, 0.341843, 0.0120867)
bones/41/rotation = Quaternion(-0.0149778, 0.939266, 0.34265, 0.0120816)
bones/41/scale = Vector3(1, 1, 1)
bones/43/rotation = Quaternion(-0.015884, 0.718179, -0.69565, -0.00621676)
bones/43/scale = Vector3(1, 1, 1)
@ -1016,37 +1036,37 @@ bones/66/rotation = Quaternion(-0.000385918, -2.26638e-14, 0.000401128, 1)
bones/68/rotation = Quaternion(-0.706834, 0.000283644, -0.000283644, 0.70738)
bones/70/rotation = Quaternion(-0.707107, 4.67924e-24, 4.67924e-24, 0.707107)
bones/73/rotation = Quaternion(1.54543e-08, -1.54543e-08, 0.707107, 0.707107)
bones/74/rotation = Quaternion(-0.652164, 0.671825, 0.244784, -0.251823)
bones/74/rotation = Quaternion(-0.652367, 0.67201, 0.244274, -0.251295)
bones/74/scale = Vector3(1, 1, 1)
bones/75/rotation = Quaternion(0.725761, -0.0543238, -0.0750463, 0.68168)
bones/75/rotation = Quaternion(0.724229, -0.0544997, -0.0749423, 0.683306)
bones/75/scale = Vector3(1, 1, 1)
bones/76/rotation = Quaternion(-0.643275, 0.00110192, 0.104547, 0.758463)
bones/76/rotation = Quaternion(-0.641974, 0.00112316, 0.104355, 0.759591)
bones/76/scale = Vector3(1, 1, 1)
bones/77/rotation = Quaternion(-0.431399, -0.0117786, 0.0625625, 0.899912)
bones/77/rotation = Quaternion(-0.431643, -0.0117232, 0.0625202, 0.899799)
bones/77/scale = Vector3(1, 1, 1)
bones/78/rotation = Quaternion(-0.848314, -0.0352934, 0.175886, 0.498178)
bones/78/rotation = Quaternion(-0.846737, -0.0355635, 0.175467, 0.500982)
bones/78/scale = Vector3(1, 1, 1)
bones/82/rotation = Quaternion(-0.844891, -0.0418192, 0.171445, 0.504991)
bones/82/rotation = Quaternion(-0.843278, -0.0421232, 0.170999, 0.507807)
bones/82/scale = Vector3(1, 1, 1)
bones/84/rotation = Quaternion(-0.583833, 0.0928994, 0.0936978, 0.80108)
bones/86/rotation = Quaternion(0.993231, 0.0067672, -0.0811647, 0.0828119)
bones/86/scale = Vector3(1, 1, 1)
bones/88/rotation = Quaternion(0.751421, -0.0197197, -0.659079, 0.0243455)
bones/88/rotation = Quaternion(0.751537, -0.0169589, -0.659158, 0.0203589)
bones/92/rotation = Quaternion(0.855906, 0.0322478, -0.0593455, 0.512701)
bones/92/scale = Vector3(1, 1, 1)
bones/94/rotation = Quaternion(0.880652, -0.00346978, -0.145337, 0.450907)
bones/94/rotation = Quaternion(0.881155, -0.00323529, -0.14553, 0.449862)
bones/94/scale = Vector3(1, 1, 1)
bones/96/rotation = Quaternion(-0.715396, 0.0713076, 0.0634679, 0.692168)
bones/98/rotation = Quaternion(-0.58515, 0.00523798, 0.107411, 0.803763)
bones/98/rotation = Quaternion(-0.583306, 0.00526915, 0.107153, 0.805136)
bones/100/rotation = Quaternion(0.808854, 0.0303333, -0.0651724, 0.583599)
bones/102/rotation = Quaternion(-0.577591, 0.00930921, 0.112415, 0.808495)
bones/102/rotation = Quaternion(-0.575728, 0.0093444, 0.112159, 0.809858)
bones/102/scale = Vector3(1, 1, 1)
bones/104/rotation = Quaternion(0.803479, 0.0249214, -0.0691385, 0.590779)
bones/106/rotation = Quaternion(-0.664852, -0.00404163, 0.107758, 0.739151)
bones/106/rotation = Quaternion(-0.662964, -0.0040188, 0.107476, 0.740886)
bones/106/scale = Vector3(1, 1, 1)
bones/108/scale = Vector3(1, 1, 1)
bones/110/rotation = Quaternion(0.346017, 0.0755612, -0.0156624, 0.935049)
bones/112/rotation = Quaternion(0.0149892, 0.939556, 0.341854, -0.0120864)
bones/112/rotation = Quaternion(0.0149778, 0.939266, 0.34265, -0.0120816)
bones/112/scale = Vector3(1, 1, 1)
bones/114/rotation = Quaternion(0.015884, 0.718179, -0.69565, 0.00621692)
bones/114/scale = Vector3(1, 1, 1)
@ -1062,106 +1082,106 @@ bones/126/rotation = Quaternion(0.993232, 0.00676712, -0.0811637, -0.0828125)
bones/126/scale = Vector3(1, 1, 0.999988)
[node name="Plane_009_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="0"]
transform = Transform3D(0.999998, 0.000474542, 0.00220294, -0.000553727, 0.99935, 0.0360751, -0.00218444, -0.0360763, 0.999347, -0.00951695, -0.0272682, 0.0438293)
transform = Transform3D(0.999998, 0.000492066, 0.00214469, -0.000555307, 0.999564, 0.0295491, -0.00212933, -0.0295503, 0.999561, -0.00916982, -0.0220667, 0.0369061)
[node name="Plane_012_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="1"]
transform = Transform3D(0.999997, 0.000805989, 0.00241873, -0.00089331, 0.99934, 0.036321, -0.0023879, -0.0363231, 0.999337, -0.0100281, -0.0271918, 0.0437539)
transform = Transform3D(0.999997, 0.000768811, 0.00232133, -0.000837579, 0.999557, 0.0297385, -0.0022976, -0.0297403, 0.999555, -0.00959325, -0.0219766, 0.0368453)
[node name="Cube_016_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="2"]
transform = Transform3D(1, -0.000451606, 0.000857875, 0.0004516, 1, 2.40505e-05, -0.000857919, -2.37077e-05, 1, -0.00746894, -0.00116129, 0.00258005)
transform = Transform3D(0.999999, -0.000257852, 0.00105718, 0.000257794, 1, -2.16067e-06, -0.00105734, 2.48849e-06, 0.999999, -0.00751305, -0.000531077, 0.00322863)
[node name="Plane_004_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="3"]
transform = Transform3D(0.999998, -0.000399187, 0.00166725, 0.000322089, 0.998943, 0.0459651, -0.00168382, -0.0459647, 0.998942, -0.00752044, -0.0520916, 0.0135581)
transform = Transform3D(0.999998, -0.000347093, 0.00151866, 0.00029245, 0.99936, 0.0357676, -0.00153017, -0.035767, 0.999359, -0.0072608, -0.0389265, 0.0101446)
[node name="Cube_013_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="4"]
transform = Transform3D(0.999998, -0.000389121, 0.00191401, 0.000368886, 0.999945, 0.0105723, -0.00191803, -0.0105716, 0.999942, -0.00785756, -0.0049752, 0.00379515)
transform = Transform3D(0.999998, -0.000261046, 0.0019374, 0.000241578, 0.99995, 0.0100254, -0.00194004, -0.0100249, 0.999948, -0.00784779, -0.00435364, 0.00398684)
[node name="Plane_011_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="5"]
transform = Transform3D(0.999999, -0.00137137, -0.000459265, 0.00139278, 0.998738, 0.0502089, 0.000389839, -0.0502094, 0.998739, 0.00461245, -0.307657, -0.0118656)
transform = Transform3D(0.999999, -0.00118595, -0.000923851, 0.00123121, 0.998713, 0.0507104, 0.000862394, -0.0507113, 0.998713, 0.00670314, -0.305107, -0.0106182)
[node name="Plane_002_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="6"]
transform = Transform3D(0.999998, 0.000760898, 0.00214268, -0.000832543, 0.999433, 0.0336593, -0.00211582, -0.033661, 0.999431, -0.0102794, -0.0150487, 0.0662665)
transform = Transform3D(0.999997, 0.000837341, 0.00214903, -0.000905618, 0.999489, 0.03195, -0.00212129, -0.0319518, 0.999487, -0.0101366, -0.0140275, 0.0630953)
[node name="Plane_013_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="7"]
transform = Transform3D(0.999998, 0.000760898, 0.00214268, -0.000832543, 0.999433, 0.0336593, -0.00211582, -0.033661, 0.999431, -0.0102794, -0.0150487, 0.0662665)
transform = Transform3D(0.999997, 0.000837341, 0.00214903, -0.000905618, 0.999489, 0.03195, -0.00212129, -0.0319518, 0.999487, -0.0101366, -0.0140275, 0.0630953)
[node name="Cube_007_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="8"]
transform = Transform3D(0.999999, -0.0005145, 0.00161587, 0.000446156, 0.999116, 0.0420445, -0.00163604, -0.0420437, 0.999114, -0.00742579, -0.0466312, 0.0131674)
transform = Transform3D(0.999999, -0.000366934, 0.00164937, 0.000300921, 0.999207, 0.039803, -0.00166278, -0.0398024, 0.999206, -0.00743294, -0.0437782, 0.0127041)
[node name="Plane_015_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="9"]
transform = Transform3D(0.999997, -0.000292815, 0.00261192, 0.000431947, 0.998573, -0.0534056, -0.00259252, 0.0534064, 0.99857, -0.00976324, 0.162588, -0.0533457)
transform = Transform3D(0.999997, -0.000165671, 0.00258759, 0.000296064, 0.998724, -0.050491, -0.00257605, 0.0504917, 0.998721, -0.00962901, 0.15409, -0.0502563)
[node name="Cube_010_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="10"]
transform = Transform3D(1, -4.57633e-05, -0.00065242, 7.97603e-05, 0.998641, 0.0521135, 0.000649153, -0.0521133, 0.998641, 0.00422239, -0.314503, -0.131224)
transform = Transform3D(1, -3.8838e-05, -0.00060342, 6.8225e-05, 0.998807, 0.0488326, 0.000600694, -0.0488325, 0.998807, 0.00391459, -0.294952, -0.124627)
[node name="Cube_012_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="11"]
transform = Transform3D(1, -0.000255194, -0.000541524, 0.000270794, 0.999583, 0.028881, 0.000533936, -0.028881, 0.999583, 0.00370526, -0.186699, -0.146902)
transform = Transform3D(1, -0.000240944, -0.000511086, 0.000254773, 0.999627, 0.0273132, 0.000504209, -0.0273132, 0.999627, 0.00349736, -0.176578, -0.138892)
[node name="Cylinder_002_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="12"]
transform = Transform3D(1, -1.77636e-15, 0, -1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.172059)
transform = Transform3D(1, -1.77636e-15, 0, -1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.162547)
[node name="Cube_006_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="13"]
transform = Transform3D(1, 7.18899e-10, -2.01781e-08, -7.60139e-10, 1, -1.49128e-07, 2.01603e-08, 1.78756e-07, 1, -1.19209e-07, -1.43051e-06, -0.172059)
transform = Transform3D(1, 7.18899e-10, -2.01781e-08, -7.60139e-10, 1, -1.49128e-07, 2.01603e-08, 1.78756e-07, 1, -1.19209e-07, -1.43051e-06, -0.162547)
[node name="Cube_017_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="14"]
transform = Transform3D(1, 3.15225e-10, 2.16325e-08, -3.11474e-10, 1, -1.19326e-07, -2.16737e-08, 1.78814e-07, 1, 1.19209e-07, -1.90735e-06, -0.172061)
transform = Transform3D(1, 3.15225e-10, 2.16325e-08, -3.11474e-10, 1, -1.19326e-07, -2.16737e-08, 1.78814e-07, 1, 1.19209e-07, -1.90735e-06, -0.162549)
[node name="Cube_005_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="15"]
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.172061)
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.162549)
[node name="Cube_005_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D/Cube_005_Material_0" index="0"]
surface_material_override/0 = ExtResource("8_dt6e4")
[node name="Cube_005_Inside_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="16"]
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.172061)
transform = Transform3D(1, -1.7053e-13, -3.41061e-13, 2.84217e-13, 1, -9.23872e-07, 3.41061e-13, 9.23872e-07, 1, -9.09153e-13, 4.52995e-06, -0.162549)
[node name="Plane_003_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="17"]
transform = Transform3D(1, 1.08827e-10, -1.00637e-08, -1.10077e-10, 1, -2.82656e-07, 1.00761e-08, 2.82598e-07, 1, -2.38419e-07, 0, -0.172059)
transform = Transform3D(1, 1.08827e-10, -1.00637e-08, -1.10077e-10, 1, -2.82656e-07, 1.00761e-08, 2.82598e-07, 1, -2.38419e-07, 0, -0.162547)
[node name="Plane_016_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="18"]
transform = Transform3D(1, -1.08827e-10, 1.00637e-08, 1.10077e-10, 1, -2.82656e-07, -1.00761e-08, 2.82598e-07, 1, 2.38419e-07, 0, -0.172059)
transform = Transform3D(1, -1.08827e-10, 1.00637e-08, 1.10077e-10, 1, -2.82656e-07, -1.00761e-08, 2.82598e-07, 1, 2.38419e-07, 0, -0.162547)
[node name="Cube_008_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="19"]
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.172059)
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.162547)
[node name="Cube_008_Inside_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="20"]
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.172059)
transform = Transform3D(1, -2.64698e-23, 9.95068e-31, 2.64698e-23, 1, 0, -9.95068e-31, 0, 1, -1.90621e-29, 0, -0.162547)
[node name="Plane_006_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="21"]
transform = Transform3D(0.999998, -0.000474811, -0.00220297, 0.000554025, 0.99935, 0.0360758, 0.00218437, -0.0360769, 0.999347, 0.00951743, -0.0272651, 0.0438303)
transform = Transform3D(0.999998, -0.000493154, -0.00214341, 0.000556186, 0.999565, 0.0295495, 0.0021278, -0.0295507, 0.999561, 0.00917196, -0.0220603, 0.0369015)
[node name="Plane_008_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="22"]
transform = Transform3D(0.999997, -0.000815392, -0.00243404, 0.000903428, 0.999339, 0.036381, 0.00240278, -0.0363831, 0.999336, 0.0100498, -0.0272098, 0.0438582)
transform = Transform3D(0.999997, -0.000766248, -0.00231493, 0.000834718, 0.999557, 0.0297911, 0.002291, -0.0297932, 0.999554, 0.00958753, -0.0220249, 0.036881)
[node name="Cube_004_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="23"]
transform = Transform3D(1, 0.000451466, -0.000857905, -0.000451414, 1, 2.36183e-05, 0.000857919, -2.32309e-05, 1, 0.00746775, -0.00115849, 0.00258034)
transform = Transform3D(0.999999, 0.000257961, -0.00105745, -0.000258103, 1, -2.39909e-06, 0.00105736, 2.5183e-06, 1, 0.00751424, -0.000528976, 0.00322941)
[node name="Plane_005_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="24"]
transform = Transform3D(0.999999, 0.000404149, -0.00166931, -0.000326425, 0.998942, 0.0460055, 0.00168578, -0.0460054, 0.99894, 0.0075264, -0.0521585, 0.0135807)
transform = Transform3D(0.999999, 0.000346988, -0.00151797, -0.000292003, 0.999361, 0.0357664, 0.0015289, -0.0357663, 0.999359, 0.00726628, -0.0389227, 0.0101442)
[node name="Cube_003_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="25"]
transform = Transform3D(0.999998, 0.000389181, -0.00191398, -0.000368901, 0.999944, 0.0105719, 0.00191795, -0.0105712, 0.999942, 0.00785661, -0.00497282, 0.00379491)
transform = Transform3D(0.999998, 0.000261255, -0.00193757, -0.000241973, 0.99995, 0.0100245, 0.00194001, -0.0100242, 0.999948, 0.0078485, -0.00435126, 0.00398731)
[node name="Plane_007_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="26"]
transform = Transform3D(0.999999, 0.00137085, 0.000460021, -0.00139216, 0.998741, 0.0501453, -0.000390749, -0.0501458, 0.998742, -0.00461483, -0.307369, -0.0119133)
transform = Transform3D(0.999999, 0.00118631, 0.000923263, -0.00123169, 0.998713, 0.0507092, -0.000862018, -0.0507103, 0.998713, -0.00669885, -0.305104, -0.0106158)
[node name="Plane_014_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="27"]
transform = Transform3D(0.999998, -0.000761285, -0.00214255, 0.000833005, 0.999433, 0.0336574, 0.00211566, -0.0336591, 0.999431, 0.0102799, -0.0150417, 0.0662646)
transform = Transform3D(0.999997, -0.000837207, -0.00214925, 0.000905335, 0.999489, 0.0319487, 0.00212132, -0.0319507, 0.999487, 0.0101385, -0.0140243, 0.0630975)
[node name="Plane_010_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="28"]
transform = Transform3D(0.999997, -0.00145058, -0.00222847, 0.00152536, 0.999424, 0.0339202, 0.00217795, -0.0339237, 0.999422, 0.0113895, -0.0148526, 0.0652399)
transform = Transform3D(0.999997, -0.00149003, -0.00223048, 0.00156097, 0.999481, 0.0321939, 0.00218127, -0.0321974, 0.999479, 0.0111895, -0.0138416, 0.0621254)
[node name="Cube_014_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="29"]
transform = Transform3D(0.999999, 0.000514388, -0.00161576, -0.000445955, 0.999116, 0.042043, 0.00163589, -0.0420421, 0.999115, 0.00742507, -0.0466251, 0.0131657)
transform = Transform3D(0.999999, 0.000367112, -0.00164969, -0.000301264, 0.999208, 0.039802, 0.00166286, -0.0398016, 0.999206, 0.00743461, -0.0437751, 0.0127051)
[node name="Plane_001_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="30"]
transform = Transform3D(0.999997, 0.00029289, -0.00261169, -0.000431925, 0.998573, -0.0534061, 0.0025923, 0.053407, 0.99857, 0.00976229, 0.162591, -0.0533462)
transform = Transform3D(0.999997, 0.000165902, -0.00258761, -0.000296436, 0.998725, -0.0504924, 0.00257585, 0.0504929, 0.998721, 0.0096302, 0.154093, -0.0502553)
[node name="Cube_015_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="31"]
transform = Transform3D(1, 4.49531e-05, 0.000651134, -7.88048e-05, 0.998643, 0.0520901, -0.000647941, -0.0520901, 0.998642, -0.00421453, -0.314371, -0.131238)
transform = Transform3D(1, 3.87654e-05, 0.000602996, -6.82492e-05, 0.998807, 0.0488329, -0.000600482, -0.0488329, 0.998807, -0.0039115, -0.294954, -0.124627)
[node name="Cube_001_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="32"]
transform = Transform3D(1, 0.000255261, 0.000541636, -0.000270793, 0.999583, 0.0288806, -0.000534069, -0.0288807, 0.999583, -0.00370669, -0.186696, -0.146903)
transform = Transform3D(1, 0.000241077, 0.000510905, -0.000255023, 0.999627, 0.0273135, -0.000504234, -0.0273136, 0.999627, -0.00349641, -0.17658, -0.138893)
[node name="Cylinder_001_Material_0" parent="Sketchfab_model/bed584e06fe94e71a7ac484cee9f0a16_fbx/Object_2/RootNode/Armature/Object_5/Skeleton3D" index="33"]
transform = Transform3D(1, 1.77636e-15, 0, 1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.172059)
transform = Transform3D(1, 1.77636e-15, 0, 1.77636e-15, 1, -4.37113e-08, 0, 4.37113e-08, 1, 0, 0, -0.162547)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://d75odchj18u1"]
[gd_scene load_steps=21 format=3 uid="uid://d75odchj18u1"]
[ext_resource type="Script" path="res://src/crosshair.gd" id="1_8vuwf"]
[ext_resource type="Shader" path="res://src/shaders/threshold.gdshader" id="1_bg1gg"]
@ -8,6 +8,8 @@
[ext_resource type="Texture2D" uid="uid://hmt7s15m7eto" path="res://assets/textures/crosshair_dot.png" id="3_3u7nt"]
[ext_resource type="Texture2D" uid="uid://mmit1txxkbvb" path="res://assets/textures/compass.png" id="5_6lb45"]
[ext_resource type="Script" path="res://src/compass.gd" id="5_ovssf"]
[ext_resource type="Script" path="res://src/overlay_effects.gd" id="7_o2wgd"]
[ext_resource type="Shader" path="res://src/shaders/speed_lines.gdshader" id="7_sbbkm"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ag8l2"]
shader = ExtResource("1_rg2hr")
@ -18,6 +20,23 @@ shader = ExtResource("1_rg2hr")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hre76"]
shader = ExtResource("1_rg2hr")
[sub_resource type="FastNoiseLite" id="FastNoiseLite_gkq2g"]
noise_type = 0
frequency = 0.1344
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_jnd2r"]
noise = SubResource("FastNoiseLite_gkq2g")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_d76dl"]
shader = ExtResource("7_sbbkm")
shader_parameter/line_count = 2.0
shader_parameter/line_density = 0.0
shader_parameter/line_falloff = 0.0
shader_parameter/mask_size = 0.166
shader_parameter/mask_edge = 1.0
shader_parameter/animation_speed = 20.0
shader_parameter/noise = SubResource("NoiseTexture2D_jnd2r")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ubp15"]
shader = ExtResource("1_bg1gg")
shader_parameter/color_low = Color(0, 0, 0, 1)
@ -26,6 +45,42 @@ shader_parameter/threshold = 0.455
shader_parameter/contrast = 1.0
shader_parameter/offset = 0.0
[sub_resource type="Animation" id="Animation_vu38v"]
resource_name = "boost_lines"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("UI/OverlayEffects/SpeedLinesOverlay:material:shader_parameter/line_density")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 1),
"transitions": PackedFloat32Array(1, 1.4, 1),
"update": 0,
"values": [0.0, 0.4, 0.0]
}
[sub_resource type="Animation" id="Animation_g25ja"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("UI/OverlayEffects/SpeedLinesOverlay:material:shader_parameter/line_density")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qjn7a"]
_data = {
"RESET": SubResource("Animation_g25ja"),
"boost_lines": SubResource("Animation_vu38v")
}
[node name="Main" type="Control"]
custom_minimum_size = Vector2(1900, 768)
layout_mode = 3
@ -80,6 +135,18 @@ offset_bottom = 32.0
texture = ExtResource("5_6lb45")
stretch_mode = 1
[node name="OverlayEffects" type="Control" parent="UI" groups=["OverlayEffectsGroup"]]
anchors_preset = 0
offset_right = 1900.0
offset_bottom = 768.0
script = ExtResource("7_o2wgd")
[node name="SpeedLinesOverlay" type="ColorRect" parent="UI/OverlayEffects"]
material = SubResource("ShaderMaterial_d76dl")
layout_mode = 0
offset_right = 1900.0
offset_bottom = 768.0
[node name="ViewportContainer" type="SubViewportContainer" parent="."]
material = SubResource("ShaderMaterial_ubp15")
layout_mode = 0
@ -93,3 +160,8 @@ size = Vector2i(1900, 768)
render_target_update_mode = 4
[node name="ArenaMap" parent="ViewportContainer/Viewport" instance=ExtResource("1_bvhtq")]
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_qjn7a")
}

9
src/overlay_effects.gd Normal file
View File

@ -0,0 +1,9 @@
class_name OverlayEffects
extends Control
@onready var animation_player: AnimationPlayer = $"../../AnimationPlayer"
func play_boost() -> void:
animation_player.play("boost_lines")
animation_player.seek(0)

View File

@ -2,7 +2,8 @@ extends CharacterBody3D
const TARGET_FPS: float = 60.0
const BASE_SPEED: float = 5.0
const JUMP_FORCE: float = 4.5
const BOOST_FORCE: float = 20.0
const JUMP_FORCE: float = 8.0
const FRICTION: float = 0.3
const AIR_DRAG: float = 0.03
const INPUT_SENSITIVITY: float = 0.7
@ -14,28 +15,42 @@ var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
@onready var camera_root: ThirdPersonCamera = $CameraRoot
@onready var mesh: Node3D = $Mesh
@onready var animation_tree: AnimationTree = $Mesh/Mech/AnimationTree
@onready var animation_player: AnimationPlayer = $AnimationPlayer
@onready var _crosshair: Crosshair = get_tree().get_first_node_in_group("CrosshairGroup")
@onready var _overlay: OverlayEffects = get_tree().get_first_node_in_group("OverlayEffectsGroup")
func is_boosting() -> bool:
return animation_tree["parameters/boost/active"]
func _physics_process(delta: float) -> void:
var delta_factor: float = delta * TARGET_FPS
if is_boosting():
_crosshair.jostle(Vector2(randf_range(-3, 3), randf_range(-3, 3)))
else:
# Add the gravity.
if not is_on_floor():
velocity.y -= gravity * delta
animation_tree["parameters/jump_state/transition_request"] = "in_air"
animation_tree["parameters/anim_state/transition_request"] = "air"
elif animation_tree["parameters/anim_state/current_state"] == "air":
# If not on floor but still in jump state, transition back to landing
animation_tree["parameters/jump_state/transition_request"] = "end"
# Handle jump.
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_FORCE
if is_boosting():
# Jump cancels boost
animation_tree["parameters/boost/request"] = 2 # Abort
# Get the input direction and handle the movement/deceleration.
var input_dir: Vector2 = Input.get_vector("left", "right", "forward", "backward")
if input_dir:
# Transform movement based on camera angle
var movement: Vector3 = (
(
camera_root.global_transform.basis
@ -44,9 +59,25 @@ func _physics_process(delta: float) -> void:
)
. normalized()
)
velocity.x = lerpf(velocity.x, movement.x * BASE_SPEED, delta_factor * INPUT_SENSITIVITY)
velocity.z = lerpf(velocity.z, movement.z * BASE_SPEED, delta_factor * INPUT_SENSITIVITY)
if not is_boosting():
velocity.x = lerpf(
velocity.x, movement.x * BASE_SPEED, delta_factor * INPUT_SENSITIVITY
)
velocity.z = lerpf(
velocity.z, movement.z * BASE_SPEED, delta_factor * INPUT_SENSITIVITY
)
if Input.is_action_just_pressed("boost"):
velocity.x += movement.x * BOOST_FORCE
velocity.z += movement.z * BOOST_FORCE
velocity.y = 0.0
mesh.rotation.y = atan2(velocity.x, velocity.z)
animation_tree["parameters/boost/request"] = 1
_overlay.play_boost()
animation_player.play("boost_fov")
animation_player.seek(0)
# Slowly turn mesh towards camera vector when moving on ground
if is_on_floor():
mesh.rotation.y = lerp_angle(
mesh.rotation.y, camera_root.rotation.y, delta_factor * TURN_SENSITIVITY
@ -58,7 +89,7 @@ func _physics_process(delta: float) -> void:
delta_factor * TURN_SENSITIVITY
)
var drag: float = FRICTION if is_on_floor() else AIR_DRAG
var drag: float = FRICTION if (is_on_floor() and not is_boosting()) else AIR_DRAG
velocity.x = lerpf(velocity.x, 0.0, delta_factor * drag)
velocity.z = lerpf(velocity.z, 0.0, delta_factor * drag)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=5 format=3 uid="uid://bqp5mwyat3asv"]
[gd_scene load_steps=8 format=3 uid="uid://bqp5mwyat3asv"]
[ext_resource type="Script" path="res://src/player/player.gd" id="1_h16ke"]
[ext_resource type="Script" path="res://src/player/third_person_camera.gd" id="3_gichr"]
@ -7,6 +7,42 @@
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_otw5j"]
radius = 0.7
[sub_resource type="Animation" id="Animation_ss43j"]
resource_name = "boost_fov"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CameraRoot/SpringArm3D/Camera3D:fov")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [75.0, 80.0, 75.0]
}
[sub_resource type="Animation" id="Animation_ycaf1"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CameraRoot/SpringArm3D/Camera3D:fov")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [75.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pg8yw"]
_data = {
"RESET": SubResource("Animation_ycaf1"),
"boost_fov": SubResource("Animation_ss43j")
}
[node name="Player" type="CharacterBody3D"]
script = ExtResource("1_h16ke")
@ -31,4 +67,9 @@ spring_length = -1.5
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, -1.5)
current = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_pg8yw")
}
[connection signal="stomp" from="Mesh/Mech" to="." method="_on_mech_stomp"]

View File

@ -38,7 +38,7 @@ func _unhandled_input(event: InputEvent) -> void:
pitch_max
)
if _crosshair:
_crosshair.jostle(motion * CROSSHAIR_MOUSE_JOSTLE)
_crosshair.jostle(motion * CROSSHAIR_MOUSE_JOSTLE * -1.0)
func _physics_process(delta: float) -> void:

View File

@ -0,0 +1,52 @@
/* Speed Lines effect
* Adapted from https://godotshaders.com/shader/speed-lines-shader-for-godot-4/
*/
shader_type canvas_item;
uniform sampler2D noise: repeat_enable;
uniform float line_count: hint_range(0.0, 2.0, 0.05) = 0.5;
uniform float line_density: hint_range(0.0, 1.0) = 0.5;
uniform float line_falloff: hint_range(0.0, 1.0) = 0.25;
uniform float mask_size: hint_range(0.0, 1.0) = 0.1;
uniform float mask_edge: hint_range(0.0, 1.0) = 0.5;
uniform float animation_speed: hint_range(1.0, 20.0) = 0.5;
uniform sampler2D screen_texture: hint_screen_texture;
float inv_lerp(float from, float to, float value) {
return (value - from) / (to - from);
}
vec2 polar_coordinates(vec2 uv, vec2 center, float zoom, float repeat) {
vec2 dir = uv - center;
float radius = length(dir) * 2.0;
float angle = atan(dir.y, dir.x) * 1.0 / (PI * 2.0);
return mod(vec2(radius * zoom, angle * repeat), 1.0);
}
vec2 rotate_uv(vec2 uv, vec2 pivot, float rotation) {
float cosa = cos(rotation);
float sina = sin(rotation);
uv -= pivot;
return vec2(
cosa * uv.x - sina * uv.y,
cosa * uv.y + sina * uv.x
) + pivot;
}
void fragment() {
vec2 polar_uv = polar_coordinates(rotate_uv(UV, vec2(0.5), floor(fract(TIME) * animation_speed)), vec2(0.5), 0.01, line_count);
vec3 lines = texture(noise, polar_uv).rgb;
float mask_value = length(UV - vec2(0.5));
float mask = inv_lerp(mask_size, mask_edge, mask_value);
float result = 1.0 - (mask * line_density);
result = smoothstep(result, result + line_falloff, lines.r);
vec3 screen_color = texture(screen_texture, SCREEN_UV).rgb;
COLOR.rgb = 1.0 - screen_color.rgb;
COLOR.a = min(1.0, result);
}