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
16 lines
No EOL
508 B
Text
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;
|
|
} |