mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-19 04:15:57 +00:00
In mirror mode the replay copied every range a shader wrote from the VRAM mirror back to guest memory at the end of the submission. TotK's particle emitters write a new particle's whole record into a free slot of a buffer the simulation shaders update, so the copy put the mirror's stale words over fresh spawns: the waterfall splashes and mist showed about once a second and the falling rain drifted. Now each written range gets a snapshot in the prologue of the part that first writes it, after the CPU-to-mirror copies, and at the end of the submission shaders/wb_merge.comp writes only the 32-bit words that differ from the snapshot. Words the GPU left alone keep what the CPU wrote. About 0.1 MiB and three or four dispatches a frame in rain. TOTK_WB_MERGE=0 restores the copies. The merge's push descriptors go through rec_push so they keep their place in the recorder's call order.