Implements procedural ground tile generation
Adds procedural ground tile generation with chunking for improved performance. Includes: - Ground tile entity with debug text and cell information - Grass and tree placement based on cell data - Ground shader for visual representation - Chunk loading and unloading system based on player position
This commit is contained in:
parent
95665f54eb
commit
b5bf7619e6
21 changed files with 532 additions and 149 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=65 format=4 uid="uid://bwsugg4p50fjr"]
|
||||
[gd_scene load_steps=62 format=4 uid="uid://bwsugg4p50fjr"]
|
||||
|
||||
[ext_resource type="Environment" uid="uid://cm77bbr0io118" path="res://Stages/Test3D/new_environment.tres" id="1_8ph61"]
|
||||
[ext_resource type="Script" uid="uid://bwed2dwogfmxv" path="res://Entities/Player/scripts/player.gd" id="1_d602n"]
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
[ext_resource type="Shader" uid="uid://bsemnmdracd4m" path="res://Common/shaders/outline.gdshader" id="4_feu7y"]
|
||||
[ext_resource type="PackedScene" uid="uid://c66kiiacr2bym" path="res://Stages/Test3D/assets/grass.glb" id="6_8ph61"]
|
||||
[ext_resource type="PackedScene" uid="uid://dg6v7qap28a5o" path="res://Stages/Test3D/assets/rock-a.glb" id="7_8537y"]
|
||||
[ext_resource type="Shader" uid="uid://dbduq0qcaxmyi" path="res://grass.gdshader" id="7_hvb1l"]
|
||||
[ext_resource type="Material" uid="uid://b1miqvl8lus75" path="res://Stages/Test3D/GrassMaterialOverride.tres" id="7_caaui"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctw4ktjdpiva7" path="res://Stages/Test3D/assets/rock-b.glb" id="8_h8fbl"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://r2imjo7o2734" path="res://Stages/Test3D/assets/stylizedGrassMeshes/grass2.res" id="8_xvexm"]
|
||||
[ext_resource type="PackedScene" uid="uid://nsnthin0ekva" path="res://Stages/Test3D/assets/rock-c.glb" id="9_rt72s"]
|
||||
|
|
@ -40,7 +40,8 @@ script/source = "@tool
|
|||
extends DirectionalLight3D
|
||||
|
||||
func _process(_delta):
|
||||
(%PostProcessing as MeshInstance3D).mesh.surface_get_material(0).set_shader_parameter('light_direction', -global_basis.z)
|
||||
pass
|
||||
#(%PostProcessing as MeshInstance3D).mesh.surface_get_material(0).set_shader_parameter('light_direction', -global_basis.z)
|
||||
"
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_tfa5t"]
|
||||
|
|
@ -374,26 +375,6 @@ material = SubResource("ShaderMaterial_tfa5t")
|
|||
flip_faces = true
|
||||
size = Vector2(2, 2)
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_hvb1l"]
|
||||
|
||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_xvexm"]
|
||||
noise = SubResource("FastNoiseLite_hvb1l")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ukp6m"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("7_hvb1l")
|
||||
shader_parameter/top_color = Color(0.415686, 0.694118, 0.266667, 1)
|
||||
shader_parameter/bottom_color = Color(0.176471, 0.333333, 0.0941176, 1)
|
||||
shader_parameter/ambient_occlusion_factor = 0.5
|
||||
shader_parameter/specular_strength = 0.4
|
||||
shader_parameter/player_displacement_strength = 1.0
|
||||
shader_parameter/player_displacement_size = 0.53
|
||||
shader_parameter/wind_direction = Vector3(0.4, -0.3, 0.81)
|
||||
shader_parameter/wind_strength = 0.3
|
||||
shader_parameter/wind_noise = SubResource("NoiseTexture2D_xvexm")
|
||||
shader_parameter/wind_noise_size = 0.05
|
||||
shader_parameter/wind_noise_speed = 0.1
|
||||
|
||||
[sub_resource type="MultiMesh" id="MultiMesh_hvb1l"]
|
||||
transform_format = 1
|
||||
instance_count = 10000
|
||||
|
|
@ -785,7 +766,8 @@ script = ExtResource("2_sdmks")
|
|||
transform = Transform3D(1, 0, 0, 0, 1, -1.49012e-07, 0, 1.19209e-07, 1, 0.0410548, 0.237644, 3.45114)
|
||||
projection = 1
|
||||
current = true
|
||||
size = 3.0
|
||||
size = 4.0
|
||||
near = 0.01
|
||||
far = 100.0
|
||||
|
||||
[node name="PostProcessing" type="MeshInstance3D" parent="SubViewportContainer/SubViewport/Player/CameraPivot/Camera3D"]
|
||||
|
|
@ -803,7 +785,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.247314, 0, 0.404175)
|
|||
|
||||
[node name="MultiMesh3D" type="MultiMeshInstance3D" parent="SubViewportContainer/SubViewport/Environment"]
|
||||
unique_name_in_owner = true
|
||||
material_override = SubResource("ShaderMaterial_ukp6m")
|
||||
material_override = ExtResource("7_caaui")
|
||||
cast_shadow = 0
|
||||
multimesh = SubResource("MultiMesh_hvb1l")
|
||||
|
||||
|
|
@ -850,7 +832,7 @@ draw_pass_1 = SubResource("QuadMesh_hvb1l")
|
|||
[node name="OmniLight3D" type="OmniLight3D" parent="SubViewportContainer/SubViewport/VFX/Fire"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000509977, 0.121094, -0.00151992)
|
||||
light_color = Color(0.89, 0.461613, 0.2136, 1)
|
||||
light_energy = 0.779335
|
||||
light_energy = 0.763335
|
||||
light_indirect_energy = 1.084
|
||||
light_volumetric_fog_energy = 3.764
|
||||
light_size = 0.105
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue