saumwacht-godot/scripts/luneraria/view/lune_pad.gdshader
Martin Stickelbroeck 8b17563814 G1: Drei-Lane-Layout mit Höhenfeld, Grotte, Aufmarschbereichen und MOBA-Kamera
Top windet sich über das Hochland, Mid quert die Kluft über die Mittelplattform,
Bottom führt durch das Tiefland über die Deltabrücke; Top und Bottom sind exakt
gleich lang, alles bleibt spiegelsymmetrisch. LuneTerrain liefert ein exakt
gespiegeltes Höhenfeld, auf dem Figuren stehen. Bossgrotte als Terrasse auf der
Achse zwischen Top und Mid, Aufmarschbereiche je Lane, perspektivische Kamera
mit Sprungtasten (F2–F4, B, G, H, O, R, Q/E). Bestandsassets wiederverwendet,
neue Formen als Blockout für G2/G4.

Geprüft: verify_g1 443/443, Regeln 91/91, M2 73/73, verify_m1 38/38,
verify_m2 14/14, Netz 43/43, Loopback 12/12, Balance 40 Partien (Seitentausch
20/20), Legacy 209/463. Vorher/Nachher-Aufnahmen und Messungen in G1-KARTE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 00:09:48 +02:00

32 lines
1.5 KiB
Text

// Deployment area on a lane: team-coloured border, faint fill and one line per
// formation row (1.5 m apart), plus chevrons at the front that point down the lane.
// UV.x runs across the pad (-1..1), UV.y along it in metres from the rear edge.
shader_type spatial;
render_mode unshaded, blend_mix, depth_draw_never, cull_disabled, shadows_disabled;
uniform vec4 tint : source_color = vec4(.35, .66, 1.0, 1.0);
uniform float pad_length = 7.4;
uniform float row_start = 7.2;
uniform float row_spacing = 1.5;
uniform float strength = 1.0;
uniform float highlight = 0.0;
void fragment() {
float across = abs(UV.x);
float along = UV.y;
// smoothstep needs edge0 < edge1 (reversed edges are undefined in GLSL).
float border = smoothstep(.86, .93, across) + (1.0 - smoothstep(.08, .22, along)) + smoothstep(pad_length - .22, pad_length - .08, along);
float rows = 0.0;
for (int i = 0; i < 5; i++) {
float at = row_start - float(i) * row_spacing;
rows += (1.0 - smoothstep(.0, .05, abs(along - at))) * step(across, .8) * .55;
}
float chevron = 0.0;
float front = along - (pad_length - 1.4);
if (front > 0.0 && front < 1.0) {
chevron = (1.0 - smoothstep(.0, .12, abs(front - (1.0 - across) * .7 - .15))) * step(across, .55);
}
float pulse = .75 + .25 * sin(TIME * 2.4);
float alpha = clamp(.035 + .045 * highlight + border * .5 + rows * .5 + chevron * .7, 0.0, 1.0);
// Unshaded colour stays at or below 1, so the pads never trigger bloom.
ALBEDO = min(tint.rgb * (.8 + .2 * highlight * pulse), vec3(1.0));
ALPHA = alpha * strength * (.8 + .2 * pulse * highlight);
}