mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-22 19:06:15 +08:00
327018e80a
PS5 float VideoOut buffers (A16B16G16R16F flips) hold linear scRGB light where 1.0 is SDR white; hardware scan-out applies the display transfer function. vkCmdBlitImage converts numerically only, so raw-blitting a linear-float guest frame into a UNORM swapchain crushes dim scenes to near-black. Blit float flip sources through a cached swapchain-sized sRGB intermediate (the sRGB store performs the linear->sRGB encode), then raw vkCmdCopyImage the encoded bytes into the same-compatibility-class UNORM swapchain image. Swapchains that are already sRGB keep the direct blit (their store encodes), and swapchain formats without an sRGB counterpart keep today's raw blit unchanged.