Files
retroDE_ps2/docs/ch426_authentic_vertex_alpha_closeout.md
T
thejayman77 ba74bbd5aa Snapshot: fog implementation + fidelity tooling baseline (pre bilinear-clamp fix)
Per-vertex GS fog end-to-end (gs_stub emit incl. persp_emit5, gs_prim_list_feeder
XYZ2->XYZF2 on PRIM.FGE, gs_make_sh3_scheduler_fixture.py F/FGE packing), new fog
TBs, fidelity attribution tooling. Functional baseline before removing the dead
bilinear lerp8 clamps (Codex: 161-node comb loop -> -0.042ns setup fail).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 19:56:46 -04:00

64 lines
2.9 KiB
Markdown

# Ch426 — authentic vertex-alpha repair and atmospheric composite
## Root cause
The scheduler generator's `--auth-color-tfx` path preserved captured RGB but
called `bake.rgbaq_with_q()`, a legacy helper that always writes alpha
`0xff`. The first captured alpha fan actually uses vertex alpha `0x03` at
the anchor and `0x00` at the remaining vertices. Under MODULATE+TCC, forcing
that alpha to `0xff` made the authentic additive blend roughly two orders of
magnitude stronger and produced Ch425's white rectangles.
`gs_make_sh3_scheduler_fixture.py` now packs the complete captured 32-bit
RGBA word when authentic color is enabled. It also fails closed if emitted
RGBAQ alpha differs from the canonicalized source vertex. Legacy fixtures
without authentic color retain their old opaque-alpha behavior.
## Repaired fixture
`zsrt139f22` regenerates the same 53 visible PSMT8 fan draws used by Ch405,
in three exact-state groups, with:
- captured RGBAQ alpha;
- native GS 12.4 screen coordinates;
- parsed kick semantics, authentic scissor, and framebuffer clipping;
- authentic Z/TEST/ZMSK and ALPHA state;
- runtime CLUT, MODULATE color, and production bilinear sampling.
The repaired geometry expands to 218 one-triangle bounded epochs. The final
chronological candidate `zsrt139f23` is Ch424's 125 epochs followed by the 20
authentic CT32 darken epochs and the 218 repaired alpha epochs: 363 total.
The rejected PSMT4 pass is not included.
## Production RTL acceptance
The complete replay passed:
- 1,009,406 fragments fed; 990,062 passed;
- 363 markers, zero fragment drops, zero color overflows, zero AXI errors;
- Z mismatch 0/307,200 and color mismatch 0/245,314;
- framebuffer SHA-256
`ccf574d7e7ab06a519488c187da08b8c56dce5b923b6909dafba11cad6b4ce4a`.
Against the PCSX2 frame, the accepted display mapping measures MAE 20.0713 /
RMSE 28.9639, improving on Ch424's 20.9469 / 29.7626. The new image adds a
soft captured atmospheric veil without the false white rectangles.
A controlled no-darken replay (`zsrt139f24`, Ch424 + repaired alpha) also
passed exactly but measured 20.0890 / 29.0439. The chronological CT32 pass
therefore provides a small measured improvement as well as preserving the
captured order; `zsrt139f23` remains the accepted candidate.
## Silicon acceptance
No new Quartus compile was needed. The timing-clean Ch423 RBF
(`17d1c1b49aac4d893ed56285cf0703bf375db2ee9f472ea36862cca376ae63fe`)
ran all 363 epochs on the DE25. Every texture CRC, palette checksum, staged
record count, ordered drain, and zero-drop gate passed; the host returned
`rc=0` and enabled the HDMI line-buffer source.
The board dumped all 307,200 words with 196,889 nonzero pixels, bounds
`(0,0)..(511,479)`, sum32 `0xb59376d4`, and xor32 `0x28c61f44`. Board and RTL
framebuffer dumps are byte-identical and share the SHA-256 above. Ch426 is
accepted on silicon and is the current live HDMI baseline.