fix(game): make team colours actually visible - #36
Merged
Conversation
Reported: "everything still looks the same to me." Correct, and this is why. The team tint added last time was applied through `albedoColor`, which *multiplies* the material's texture. The team band's texture is `paint_red`, so multiplying it by the friendly cyan produced near-black: the Directorate's red survived because it was already red, and Nightcell got an unlit dark band. Two teams, one visible colour, no way to tell them apart — exactly the complaint this was supposed to fix. Multiplication cannot produce a hue the source does not already contain, so the band now drops its texture and takes a flat colour instead. That is the only way to get a saturated cyan out of a red source. The band is also strongly emissive now (0.85, from 0.06). This is the one thing that has to be legible across a dark yard at 40 m, and a diffuse surface at that range is a grey smudge whatever colour it is. Emissive puts it over the scene's bloom threshold so the existing GlowLayer picks it up, which is what turns a colour into a marker. The cloth colours are pushed further apart too — cool blue-grey against warm khaki — so the silhouettes differ before the band resolves. Verified by screenshot rather than by reading the diff: at gameplay distance one figure now reads clearly cyan and the other clearly red. Co-Authored-By: Claude Opus 5 (1M context) <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.
Reported: "everything still looks the same to me." Correct, and here's why.
The bug
The team tint I added last time went through
albedoColor— which multiplies the material's texture. The team band's texture ispaint_red. Multiplying red by the friendly cyan gives ≈ black.So the Directorate's red survived (it was already red) and Nightcell got an unlit dark band. Two teams, one visible colour — exactly the complaint the change was supposed to fix. It was a real bug, not just an over-subtle choice.
The fix
Multiplication can't produce a hue the source doesn't already contain, so the band now drops its texture and takes a flat colour. That's the only way to get saturated cyan out of a red source.
The band is also strongly emissive (0.85, up from 0.06). This is the one thing that must be legible across a dark yard at 40 m, and a diffuse surface at that range is a grey smudge whatever colour it is. Emissive pushes it over the scene's bloom threshold so the existing GlowLayer picks it up — that's what turns a colour into a marker. Cloth colours are pushed further apart too (cool blue-grey vs warm khaki) so silhouettes differ before the band resolves.
Verification
Screenshotted at gameplay distance rather than read off the diff: one figure now reads clearly cyan, the other clearly red, both across a dark yard.
Incidentally the same capture caught a bot's grenade detonating as a bright orange fireball — so the explosion VFX does render, and my earlier note that particles don't work in the headless renderer was wrong. That was the emission-window bug, since fixed.
249 tests pass; lint, typecheck and build clean.
🤖 Generated with Claude Code