Storage buffer pass: track float adds past a c1 offset (night lit like day) #816

Closed
madebyjordan wants to merge 1 commit from amd/sky-ambient-f32-add into main
madebyjordan commented 2026-11-08 22:24:56 +00:00 (Migrated from github.com)

At night the picture brightens over ~2 min until Hyrule Field looks like day, with Link near black. On the Switch 2 it's a dim deep blue.

Cause

  • Program 499dbfd0721d2858 adds the sky's ambient light (float atomic adds) at c0+0x20's buffer plus a c1 offset.
  • The c1 track is rejected and float adds have no run-time fallback, so the sum is dropped on every GPU. With no ambient light, exposure lifts night to day.

Fix

  • GlobalAtomicAddF32 only, and only when no buffer was found: track again skipping c1 words and take the c0 pointer.
  • Nothing else changes. EDEN_F32_ADD_TRACK=0 turns it off.

Tested (RX 6700 XT, Windows, v2.0.5)

  • Night holds at mean luma 0.12–0.16. Without the fix it climbs 0.25 → 0.33 in 1.5 min (white clouds, day-blue sky).
  • Log: 499dbfd0721d2858 is the only program affected; it binds 0x112a2e7f00 (0xc0 bytes).
  • tests/run_all.py: same results as main.

Related

  • #886: makes these adds native, so fewer are lost under contention.
  • May be the same cause: #746, #774, #763 (not confirmed).

🤖 Generated with Claude Code

At night the picture brightens over ~2 min until Hyrule Field looks like day, with Link near black. On the Switch 2 it's a dim deep blue. **Cause** - Program `499dbfd0721d2858` adds the sky's ambient light (float atomic adds) at c0+0x20's buffer plus a c1 offset. - The c1 track is rejected and float adds have no run-time fallback, so the sum is dropped on every GPU. With no ambient light, exposure lifts night to day. **Fix** - `GlobalAtomicAddF32` only, and only when no buffer was found: track again skipping c1 words and take the c0 pointer. - Nothing else changes. `EDEN_F32_ADD_TRACK=0` turns it off. **Tested** (RX 6700 XT, Windows, v2.0.5) - Night holds at mean luma 0.12–0.16. Without the fix it climbs 0.25 → 0.33 in 1.5 min (white clouds, day-blue sky). - Log: `499dbfd0721d2858` is the only program affected; it binds `0x112a2e7f00` (0xc0 bytes). - `tests/run_all.py`: same results as main. **Related** - #886: makes these adds native, so fewer are lost under contention. - May be the same cause: #746, #774, #763 (not confirmed). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
NotRexed commented 2026-11-09 05:17:06 +00:00 (Migrated from github.com)

Merged into main in fa43939 (v2.0.6), thanks!

Merged into main in fa43939 (v2.0.6), thanks!
Commenting is not possible because the repository is archived.
No description provided.