mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:30:43 +00:00
fe6581e3fe
## Description: Reworks the visual look of nuked tiles to read uniformly green (no more brown/black bleed-through), and moves the ember "particle" effect out of the border passes — where it lived as a storage-sharing hack — into the fallout system where it belongs. ## What changed visually - **Fresh fallout**: bright uniform bloom with a hint of flickering green particles dampened on fresh tiles, ramping up as heat decays (`particleFreshScale` controls the fresh-tile dampening). - **Stale fallout**: dark-green ground (was near-black charcoal), with full-strength flickering particles in dark-green ↔ light-green. - **Particles**: per-tile flicker is now de-synced (each tile pulses at its own rate, 0.4×–1.6× base speed) so the eye can't lock onto a global rhythm. - **No more brown/black pixels** in fallout zones. Two root causes were fixed: - The territory pass now renders stale-nuke ground for **all** fallout tiles, not just unowned ones — so an owned player's color can't show through where the bloom is dim/transparent. - The ember stamp (which fully replaced tile color with orange) is gone; particle render is now additive and color-tuned green. ## Architecture cleanup The ember effect was conceptually fallout-domain, but lived in `BorderComputePass` (writing intensity into `borderTex.g`) and `BorderStampPass` (stamping orange dots), just because the border pass already had an RGBA8 texture with a free G channel. Two consumers read from it (`BorderStampPass`, `FalloutLightPass`), and the per-tile flicker math used no border data at all. This PR relocates the math inline into the two passes that actually need it (`FalloutBloomPass.extract.frag.glsl` and `FalloutLightPass.fallout-light.frag.glsl`), drops the ember code from both border passes, and renames `mapOverlay.ember*` → `falloutBloom.particle*` so the settings live with their pass. Side benefits: - **Animation correctness**: the old setup only updated ember intensity when `BorderComputePass`'s dirty flag flipped (highlight change, relations update, etc.), so the supposed flicker was actually a frozen snapshot between border events. The new inline path runs every frame as intended. - **Slightly cheaper per-frame compute**: removed a per-dirty-event full-map writeback to `borderTex.g`; added a few cheap ALU ops (1 sin + 2 hashes) per fallout tile in shaders that were already running. Same texture memory. ## Other small changes - Renamed `mapOverlay.charcoal*` → `mapOverlay.staleNuke*` (charcoal was a misnomer now that the ground is green). - Added `staleNukeR/G/B` for the ground color (was hardcoded grey). - `intensityHot` bumped 0.6 → 1.8 for a brighter fresh-nuke glow. - Raised `railroad.railMinZoom` 2 → 4 and `railDetailZoom` 4 → 6 so rails pop in later (separate small commit). <img width="354" height="371" alt="Screenshot 2026-05-22 at 10 37 34 AM" src="https://github.com/user-attachments/assets/03b46c45-c617-41b3-b3e4-9934f064bfe1" /> <img width="335" height="358" alt="Screenshot 2026-05-22 at 10 37 43 AM" src="https://github.com/user-attachments/assets/af370b19-8f22-4694-9859-1ad52aa755a7" /> <img width="651" height="613" alt="Screenshot 2026-05-22 at 10 38 09 AM" src="https://github.com/user-attachments/assets/e06e5101-8529-49f6-b29a-ce0563eb52d6" /> ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: evan