More work on maps and multiplayer

This commit is contained in:
2026-01-15 11:10:12 -05:00
parent dc8585b1f0
commit bc48e9cea2
25 changed files with 3740 additions and 136 deletions

View File

@@ -0,0 +1,24 @@
shader_type spatial;
uniform sampler2D height_gradient;
uniform float vertical_offset;
uniform float vertical_range : hint_range(1.0, 12.0, 1.0);
varying vec3 world_position;
void vertex() {
// Called for every vertex the material is visible on.
world_position = (MODEL_MATRIX * vec4(VERTEX, 1)).xyz;
}
void fragment() {
float h = (world_position.y - vertical_offset)/vertical_range;
vec2 uv = vec2(clamp(h, 0.001, 1.0),0.5);
vec4 color = texture(height_gradient, uv);
ALBEDO = color.rgb;
// Called for every pixel the material is visible on.
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://dtq021j73hhht