mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-08-01 18:29:24 -04:00
Water is a large alpha-blended surface whose interior MSAA does nothing for — it only pays for the samples. It also had to stay inside the multisampled scene pass, which meant that under MSAA it was still inside its own refraction copy: the ghost trains and brightness pumping fixed for everyone else came back for anyone with anti-aliasing on. Revive the 1x water pass that was retired when water moved into the main pass. Under MSAA the frame is now scene (multisampled) → resolve → copy → water at one sample into the resolved image → UI, matching what the non-MSAA path already does through the scene continuation pass. setupWater1xPass had no callers at all; it is now built on MSAA change and rebuilt on swapchain resize, since its framebuffers reference the swapchain views. It needs a resolved depth buffer to depth test against, and the pass targets the swapchain directly, so water stays in the scene pass when depth resolve is unavailable or post-processing renders the scene off-screen.