fix(game): give synty_atlas the light cap every other material has - #41
Merged
Merged
Conversation
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>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lighting fix. It turned out to be a one-line parity bug, not a lighting design problem.
The bug
synty_atlasis the only material inassets.tsthat never setsmaxSimultaneousLights:synty_vehiclessynty_weaponssynty_atlasBabylon 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.tsalready documents this exact failure mode from when it bit the generated props: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:
No extra lamps were needed, so none were added. 263 tests, full
pnpm checkgreen.