bye bye 3D game objects

- remove 3D-based backgrounds, which use the terribly inefficient CSG objects
- add 2D hit line texture based on Reverse (@Yasu3D)
This commit is contained in:
muskit
2023-09-13 01:33:01 -07:00
parent 26a7ac1c96
commit 14c3f96e60
8 changed files with 219 additions and 333 deletions
+107 -8
View File
@@ -1,6 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://bqh00ot0csqmk"]
[gd_scene load_steps=11 format=3 uid="uid://bqh00ot0csqmk"]
[ext_resource type="PackedScene" uid="uid://bbvduvnoesla5" path="res://Things/TunnelObjects/3D/Background/Background.tscn" id="1_2wv7o"]
[ext_resource type="Texture2D" uid="uid://dkohutwp0yujj" path="res://_Assets/Textures/BGLine.png" id="2_lkl1c"]
[sub_resource type="Environment" id="Environment_nefjb"]
ambient_light_source = 1
@@ -44,9 +44,25 @@ _surfaces = [{
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_40gjx")
[sub_resource type="ViewportTexture" id="ViewportTexture_ln6xl"]
viewport_path = NodePath("2D Viewport")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3rv8i"]
resource_local_to_scene = true
transparency = 1
shading_mode = 0
albedo_texture = SubResource("ViewportTexture_ln6xl")
uv1_scale = Vector3(-1, 1, 1)
[sub_resource type="Gradient" id="Gradient_djnn4"]
colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_vv2ac"]
gradient = SubResource("Gradient_djnn4")
width = 2048
[sub_resource type="LabelSettings" id="LabelSettings_dj3ei"]
font_size = 271
[node name="Play" type="Node"]
@@ -57,22 +73,105 @@ environment = SubResource("Environment_nefjb")
[node name="Camera3D" type="Camera3D" parent="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1.095)
current = true
fov = 60.0
near = 0.001
far = 10.0
far = 20.0
[node name="Cone" type="Node3D" parent="Node3D"]
visible = false
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0)
[node name="RootNode" type="Node3D" parent="Node3D/Cone"]
[node name="Cylinder" type="MeshInstance3D" parent="Node3D/Cone/RootNode"]
transform = Transform3D(100, 0, 0, 0, -1.19209e-05, 100, 0, -100, -1.19209e-05, 0, 0, 0)
transform = Transform3D(100, 0, 0, 0, -4.37114e-06, 100, 0, -100, -4.37114e-06, 0, 0, 0)
mesh = SubResource("ArrayMesh_qc82q")
skeleton = NodePath("")
surface_material_override/0 = SubResource("StandardMaterial3D_3rv8i")
[node name="Background" parent="Node3D" instance=ExtResource("1_2wv7o")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
[node name="2D Viewport" type="SubViewport" parent="."]
disable_3d = true
own_world_3d = true
transparent_bg = true
handle_input_locally = false
msaa_2d = 1
size = Vector2i(1920, 1920)
render_target_update_mode = 4
[node name="Node2D" type="Node2D" parent="."]
[node name="Base" type="Control" parent="2D Viewport"]
clip_contents = true
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Camera2D" type="Camera2D" parent="2D Viewport/Base"]
position = Vector2(0, -1920)
anchor_mode = 0
enabled = false
[node name="Shadow" type="TextureRect" parent="2D Viewport/Base"]
layout_mode = 2
offset_top = 1920.0
offset_right = 100.0
offset_bottom = 3840.0
rotation = -1.5708
texture = SubResource("GradientTexture1D_vv2ac")
expand_mode = 1
[node name="Line" type="TextureRect" parent="2D Viewport/Base"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -960.0
offset_top = -25.0
offset_bottom = -8.01501
grow_horizontal = 2
grow_vertical = 0
texture = ExtResource("2_lkl1c")
expand_mode = 1
[node name="Line2" type="TextureRect" parent="2D Viewport/Base"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_top = -25.0
offset_right = 960.0
offset_bottom = -8.01501
grow_horizontal = 2
grow_vertical = 0
texture = ExtResource("2_lkl1c")
expand_mode = 1
[node name="Label" type="Label" parent="2D Viewport/Base"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -970.0
offset_right = 1885.0
offset_bottom = -4.99927
grow_vertical = 0
size_flags_vertical = 3
text = "1 2 3 4 5 6 7 10"
label_settings = SubResource("LabelSettings_dj3ei")
horizontal_alignment = 1
vertical_alignment = 2
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -3000.0
offset_right = 1920.0
offset_bottom = -1080.0
grow_vertical = 0
stretch = true