nature-sim/Entities/GroundTile/GroundTile.gdshader
Dan Baker b5bf7619e6 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
2025-06-24 13:14:21 +01:00

16 lines
No EOL
508 B
Text

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;
}