Work on the manufactory as well as multiplayer features

This commit is contained in:
2026-01-28 23:59:51 -05:00
parent 0e8769a81e
commit b90fdaad98
38 changed files with 3356 additions and 4 deletions

View File

@@ -1,7 +1,15 @@
[gd_resource type="ShaderMaterial" load_steps=4 format=3 uid="uid://dljweksgxvqv6"]
[gd_resource type="ShaderMaterial" load_steps=6 format=3 uid="uid://dljweksgxvqv6"]
[ext_resource type="Shader" uid="uid://dtq021j73hhht" path="res://visuals/shaders/maptile.gdshader" id="1_o0obt"]
[sub_resource type="Gradient" id="Gradient_o0obt"]
offsets = PackedFloat32Array(0)
colors = PackedColorArray(0, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_2ho3f"]
gradient = SubResource("Gradient_o0obt")
width = 1
[sub_resource type="Gradient" id="Gradient_2ho3f"]
offsets = PackedFloat32Array(0, 0.245, 0.56, 0.8025, 1)
colors = PackedColorArray(0, 0, 0.003921569, 1, 1.6845763e-06, 0, 0.54036456, 1, 0.0007814509, 0.22053, 0.7667125, 1, 0.00022246034, 0.29345024, 0.68059045, 1, 0, 0.49560964, 0.86397636, 1)
@@ -13,6 +21,7 @@ width = 1024
[resource]
render_priority = 0
shader = ExtResource("1_o0obt")
shader_parameter/albedo_texture = SubResource("GradientTexture1D_2ho3f")
shader_parameter/height_gradient = SubResource("GradientTexture1D_lvjv7")
shader_parameter/vertical_offset = 9999.0
shader_parameter/vertical_range = 6.0

View File

@@ -1,5 +1,7 @@
shader_type spatial;
render_mode blend_mix, depth_prepass_alpha, cull_disabled;
uniform sampler2D albedo_texture : filter_nearest;
uniform sampler2D height_gradient;
uniform float vertical_offset;
uniform float vertical_range : hint_range(1.0, 12.0, 1.0);
@@ -14,7 +16,9 @@ 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);
float alpha = texture(albedo_texture, UV).a;
ALBEDO = color.rgb;
ALPHA = alpha;
// Called for every pixel the material is visible on.
}