// 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); }