Files
godot-demo-projects/xr/openxr_composition_layers/pointer.gdshader
2024-07-31 15:44:50 +10:00

17 lines
298 B
Plaintext

shader_type spatial;
uniform vec4 color : source_color = vec4(1.0, 0.0, 0.0, 0.5);
uniform float energy = 1.0;
varying float f;
void vertex() {
f = VERTEX.z + 0.5;
}
void fragment() {
// Called for every pixel the material is visible on.
ALBEDO = color.rgb;
ALPHA = color.a * f * energy;
}