Added hologram shader
This commit is contained in:
parent
c6f43fac9b
commit
4a5304d949
|
@ -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() {
|
||||||
|
//}
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bqr6jesnetffs
|
Loading…
Reference in New Issue