Added hologram shader

This commit is contained in:
CloudyBuhtz 2025-05-04 18:13:08 +01:00
parent c6f43fac9b
commit 4a5304d949
2 changed files with 30 additions and 0 deletions

29
shaders/hologram.gdshader Normal file
View File

@ -0,0 +1,29 @@
shader_type spatial;
render_mode blend_mix, depth_prepass_alpha;
uniform vec4 albedo_color : source_color;
instance uniform float built_amount = 2.0;
varying float model_y;
// Called for every vertex the material is visible on.
void vertex() {
model_y = VERTEX.y;
}
// Called for every pixel the material is visible on.
void fragment() {
float base_opacity = 0.25;
if (model_y > built_amount) {
ALPHA = base_opacity;
} else {
ALPHA = 1.0;
}
ALBEDO.rgb = albedo_color.rgb;
}
// Called for every pixel for every light affecting the material.
//void light() {
//}

View File

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