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:
Dan Baker 2025-06-24 13:14:21 +01:00
parent 95665f54eb
commit b5bf7619e6
21 changed files with 532 additions and 149 deletions

View file

@ -0,0 +1,16 @@
shader_type spatial;
uniform sampler2D noise_texture : filter_linear_mipmap;
uniform sampler2D gradient_texture : filter_linear;
uniform float noise_scale : hint_range(0.1, 10.0) = 1.0;
uniform float roughness_value : hint_range(0.0, 1.0) = 0.8;
void fragment() {
vec2 noise_uv = UV * noise_scale;
float noise_val = texture(noise_texture, noise_uv).r;
vec4 earth_color = texture(gradient_texture, vec2(noise_val, 0.0));
ALBEDO = earth_color.rgb;
ROUGHNESS = roughness_value;
}