feat(arena): add grounded lighting and asteroid dressing

This commit is contained in:
Josh Creek
2026-08-07 22:26:02 +01:00
parent 9fd1764522
commit 8d4078989c
4 changed files with 93 additions and 14 deletions
+4 -10
View File
@@ -14,11 +14,6 @@ uniform vec3 deck_color : source_color = vec3(0.085, 0.095, 0.122);
// Kept close to deck_color on purpose: per-plate variation is meant to break
// up a 24x36 m plane, not to reintroduce visible tiling.
uniform vec3 panel_color : source_color = vec3(0.104, 0.116, 0.146);
// Stand-in for bounce light. The arena is lit by one dim directional plus low
// ambient, so hull facing away from it — the goal bulkheads, the fillet caps
// either side of each mouth — otherwise crushed to pure black and the whole
// end zone read as a void with a goal floating in it.
uniform float hull_fill : hint_range(0.0, 2.0) = 0.55;
uniform float panel_variation : hint_range(0.0, 1.0) = 0.4;
uniform vec3 line_color : source_color = vec3(0.62, 0.78, 1.0);
// Must track TeamColors.TEAM_COLORS in scripts/team_colors.gd — shaders can't
@@ -47,9 +42,9 @@ uniform float seam_width = 0.22;
uniform float end_zone_strength : hint_range(0.0, 1.0) = 0.12;
uniform float panel_size = 4.0;
uniform float panel_line_width : hint_range(0.0, 0.5) = 0.05;
// Deliberately not a high metallic value: this arena is lit by one dim
// directional plus low ambient, and a near-metal deck has almost no diffuse
// response, which crushed the plating to black.
// Deliberately not a high metallic value: the local pitch lights and SDFGI
// need enough diffuse response to reveal the plating instead of turning it
// into a dark mirror at grazing angles.
uniform float deck_metallic : hint_range(0.0, 1.0) = 0.3;
uniform float deck_roughness : hint_range(0.0, 1.0) = 0.34;
@@ -135,8 +130,7 @@ void fragment() {
ALBEDO = mix(albedo, line_color, marks);
METALLIC = deck_metallic * (1.0 - marks);
ROUGHNESS = clamp(mix(rough, 0.5, marks), 0.05, 1.0);
EMISSION = albedo * hull_fill
+ line_color * marks * line_emission
EMISSION = line_color * marks * line_emission
+ seam_color * seam * seam_emission
+ zone * 0.015 * flat_deck;
}