15 lines
650 B
Text
15 lines
650 B
Text
shader_type spatial;
|
|
render_mode blend_mix, unshaded, shadows_disabled;
|
|
|
|
// A Firewall LED (gameplay-plan.md §B4). One material for every LED; each one's color and how
|
|
// brightly it's lit (a, past 1 for bloom; 0 is off) are instance uniforms.
|
|
|
|
instance uniform vec4 led : source_color = vec4(0.12, 0.16, 0.17, 0.0);
|
|
|
|
void fragment() {
|
|
vec2 p = abs(UV - 0.5) * 2.0;
|
|
float core = 1.0 - smoothstep(0.35, 1.0, max(p.x, p.y));
|
|
vec3 off = vec3(0.05, 0.07, 0.075);
|
|
// Brightness follows a: a ghost (a < 0.5) is a dim tint, a lit LED (a ≥ 1.5) blooms at its core.
|
|
ALBEDO = led.a > 0.0 ? off + led.rgb * (0.1 + led.a * (0.45 + 0.55 * core)) : off;
|
|
}
|