From 6b989f9d12b150ea3388d2daca1d6981dc210644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 13 Oct 2026 17:30:15 +0200 Subject: [PATCH] Don't use BlueToAlpha with framebuffer fetch With fetch, the shader applies the colour masks and logic ops to the real bits, and OutRun 2006's water mask comes out like the software renderer's. BlueToAlpha put the first step in alpha while the masked logic-op steps after it worked on blue, so on the Adreno 840's OpenGL the water was off by twice as much as on Vulkan. Now it matches or beats Vulkan there. Co-Authored-By: Claude Opus 5.5 --- GPU/GPUCommonHW.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/GPUCommonHW.cpp b/GPU/GPUCommonHW.cpp index b62c718501..269435a77a 100644 --- a/GPU/GPUCommonHW.cpp +++ b/GPU/GPUCommonHW.cpp @@ -895,8 +895,10 @@ void GPUCommonHW::Execute_Prim(u32 op, u32 diff) { } // See the documentation for gstate_c.blueToAlpha. + // With framebuffer fetch, the shader applies the masks and logic ops to the real bits, which gets the whole + // sequence right (OutRun 2006's water mask comes out like the software renderer's), so it isn't needed there. bool blueToAlpha = false; - if (PSP_CoreParameter().compat.flags().BlueToAlpha) { + if (PSP_CoreParameter().compat.flags().BlueToAlpha && !gstate_c.Use(GPU_USE_FRAMEBUFFER_FETCH)) { if (gstate_c.framebufFormat == GEBufferFormat::GE_FORMAT_565 && gstate.getColorMask() == 0x0FFFFF && !gstate.isLogicOpEnabled()) { blueToAlpha = true; gstate_c.framebufFormat = GEBufferFormat::GE_FORMAT_4444;