Skip to content

fix(game): give synty_atlas the light cap every other material has - #41

Merged
ralyodio merged 1 commit into
mainfrom
fix/synty-atlas-light-cap
Jul 30, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/synty-atlas-light-cap

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The lighting fix. It turned out to be a one-line parity bug, not a lighting design problem.

The bug

synty_atlas is the only material in assets.ts that never sets maxSimultaneousLights:

Material cap
generated materials (concrete, steel, …) 6
synty_vehicles 6
synty_weapons 6
synty_atlas default (4)

Babylon defaults to four lights per mesh and drops the rest silently. The yard permanently spends three of those on the hemispheric fill and the two directionals — so every mesh on this atlas (barriers, tents, guard towers, water tanks, barrel pallets) was lit by at most one lamp. And the props that most need lighting stand between pools, where the single lamp Babylon happens to pick is often not the one facing the player.

world.ts already documents this exact failure mode from when it bit the generated props:

Babylon's default cap is four lights per mesh and it drops the rest silently, which showed up as lamp pools vanishing depending on where you stood.

Why I didn't find it sooner

I assumed the props were dark because the yard is backlit by the false dawn, and tried raising the albedo multiplier — which changed nothing, so I reverted it in #40. The albedo was never the problem; there was simply no light reaching the mesh to multiply.

Result

Verified from the spawn vantages — the view a player actually gets — rather than a flattering camera angle:

  • T-walls at both spawn exits now read as tan concrete with their stencilled markings; previously featureless black
  • Tents are legible beside them
  • The lane mouth has depth instead of silhouettes

No extra lamps were needed, so none were added. 263 tests, full pnpm check green.

The Synty cover rendered as black slabs. It was not the albedo, which is what
I tried first and reverted when it changed nothing — it was the light cap.

`synty_atlas` is the only material in assets.ts that never set
`maxSimultaneousLights`. The generated materials set 6, synty_vehicles sets 6,
synty_weapons sets 6. This one inherited Babylon's default of 4, and Babylon
drops the excess *silently*.

The yard permanently spends three of those four on the hemispheric fill and
the two directionals, so every mesh on this atlas — barriers, tents, guard
towers, water tanks, barrel pallets — was lit by at most one lamp. The props
that most needed lighting stand between pools, where the single lamp Babylon
picks is often not the one facing the player. world.ts already documents this
exact failure mode from when it bit the generated props: "Babylon's default cap
is four lights per mesh and it drops the rest silently, which showed up as lamp
pools vanishing depending on where you stood."

One line. Verified from the spawn vantages rather than a flattering camera:
the T-walls at both spawn exits now read as tan concrete with their stencilled
markings, and the tents are legible beside them. Previously both were
featureless black.

No extra lamps were needed, so none were added.

263 tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit 378c3ae into main Jul 30, 2026
6 checks passed
@ralyodio
ralyodio deleted the fix/synty-atlas-light-cap branch July 30, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant