better graphic performance for 3d
This commit is contained in:
@@ -134,3 +134,6 @@ locale/translations_pot_files=PackedStringArray()
|
||||
[rendering]
|
||||
|
||||
global_illumination/gi/use_half_resolution=true
|
||||
shading/overrides/force_vertex_shading=true
|
||||
occlusion_culling/use_occlusion_culling=true
|
||||
shading/use_occlusion_culling=true
|
||||
|
@@ -1,6 +1,4 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://boxvq5qowh8nn"]
|
||||
|
||||
[sub_resource type="Environment" id="Environment_t32a1"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://boxvq5qowh8nn"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_5dg07"]
|
||||
|
||||
@@ -8,17 +6,21 @@
|
||||
resource_name = "spinning"
|
||||
script/source = "extends MeshInstance3D
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
rotate_y(0.01)
|
||||
rotate_z(0.01)
|
||||
"
|
||||
|
||||
[node name="Node3D" type="WorldEnvironment"]
|
||||
environment = SubResource("Environment_t32a1")
|
||||
[node name="3d_cube" type="Node3D"]
|
||||
|
||||
[node name="visible_on_screen_enabler_3d" type="VisibleOnScreenEnabler3D" parent="."]
|
||||
enable_mode = 1
|
||||
enable_node_path = NodePath("../mesh_instance_3d")
|
||||
|
||||
[node name="mesh_instance_3d" type="MeshInstance3D" parent="."]
|
||||
process_mode = 1
|
||||
transform = Transform3D(0.5, -0.5, 0.707107, 0.707107, 0.707107, 0, -0.5, 0.5, 0.707107, 0, 0, 0)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("BoxMesh_5dg07")
|
||||
script = SubResource("GDScript_a7mr5")
|
||||
|
||||
@@ -28,3 +30,5 @@ fov = 99.1704
|
||||
|
||||
[node name="directional_light_3d" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.856547, 0.51607, 0, -0.51607, 0.856547, 0, 0, 5.56892)
|
||||
directional_shadow_mode = 0
|
||||
sky_mode = 1
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,10 +1,23 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dxfg62cl12ppw"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://ct6s1gfjkciva"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://boxvq5qowh8nn" path="res://scenes/3D/3d_cube.tscn" id="1_643fx"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_lxe27"]
|
||||
size = Vector2(64, 64)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_1h1n3"]
|
||||
resource_name = "visibillity"
|
||||
script/source = "extends VisibleOnScreenNotifier2D
|
||||
|
||||
func OnScreenEntered():
|
||||
get_child(0).visible = true
|
||||
pass
|
||||
|
||||
func OnScreenExited():
|
||||
get_child(0).visible = false
|
||||
pass
|
||||
"
|
||||
|
||||
[node name="3d_cube_tile" type="Node2D"]
|
||||
|
||||
[node name="static_body_2d" type="StaticBody2D" parent="."]
|
||||
@@ -14,17 +27,23 @@ position = Vector2(0, 1)
|
||||
position = Vector2(1, -2)
|
||||
shape = SubResource("RectangleShape2D_lxe27")
|
||||
|
||||
[node name="sub_viewport_container" type="SubViewportContainer" parent="."]
|
||||
offset_left = -115.0
|
||||
offset_top = -112.0
|
||||
offset_right = 141.0
|
||||
offset_bottom = 144.0
|
||||
[node name="visible_on_screen_notifier_2d" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
script = SubResource("GDScript_1h1n3")
|
||||
|
||||
[node name="sub_viewport" type="SubViewport" parent="sub_viewport_container"]
|
||||
[node name="sub_viewport_container" type="SubViewportContainer" parent="visible_on_screen_notifier_2d"]
|
||||
offset_left = -115.0
|
||||
offset_top = -110.0
|
||||
offset_right = 141.0
|
||||
offset_bottom = 146.0
|
||||
|
||||
[node name="sub_viewport" type="SubViewport" parent="visible_on_screen_notifier_2d/sub_viewport_container"]
|
||||
own_world_3d = true
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
size = Vector2i(230, 230)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Node3D" parent="sub_viewport_container/sub_viewport" instance=ExtResource("1_643fx")]
|
||||
[node name="Node3D" parent="visible_on_screen_notifier_2d/sub_viewport_container/sub_viewport" instance=ExtResource("1_643fx")]
|
||||
|
||||
[connection signal="screen_entered" from="visible_on_screen_notifier_2d" to="visible_on_screen_notifier_2d" method="OnScreenEntered"]
|
||||
[connection signal="screen_exited" from="visible_on_screen_notifier_2d" to="visible_on_screen_notifier_2d" method="OnScreenExited"]
|
||||
|
@@ -4,7 +4,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://dckxciecwjfgf" path="res://scenes/tiles/dialogdebug_cupcake.tscn" id="2_0cov5"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4dkrtswpv8cv" path="res://scenes/tiles/sound_debug_tile.tscn" id="3_lf2fs"]
|
||||
[ext_resource type="Texture2D" uid="uid://d3l4uomk1gw8c" path="res://assets/textures/debug/grass_tile.png" id="4_k7c1q"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxfg62cl12ppw" path="res://scenes/tiles/3d_cube_tile.tscn" id="5_x3uol"]
|
||||
[ext_resource type="PackedScene" uid="uid://ct6s1gfjkciva" path="res://scenes/tiles/3d_cube_tile.tscn" id="5_x3uol"]
|
||||
|
||||
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_lcrun"]
|
||||
resource_name = "test"
|
||||
|
Reference in New Issue
Block a user