From bda172f21a1960b5ed84b1471cadae9899275a52 Mon Sep 17 00:00:00 2001 From: donkopunchstania Date: Wed, 22 Oct 2008 06:54:25 +0000 Subject: [PATCH] dstalpha should is not used to blend fragments. commenting out code fixed missing menu in Metroid Prime, but a proper solution is needed. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@932 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/PixelShader.cpp | 10 +++++++--- .../Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShader.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShader.cpp index 9c29c502fe..6e3b3c283c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShader.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShader.cpp @@ -427,10 +427,14 @@ char *GeneratePixelShader(u32 texture_mask, bool has_zbuffer_target, bool bRende } else { if (!bRenderZToCol0) { - if (bpmem.dstalpha.enable) + /* NEEDS FIX - dstalpha does not change how fragments are blended with the EFB + once the blending is done, the dstalpha is written to the EFB in place of the + fragment alpha if dstalpha is enabled. this only matters if the EFB supports alpha. + if (bpmem.dstalpha.enable) WRITE(p, " ocol0 = float4(prev.rgb,"I_ALPHA"[0].w);\n"); - else - WRITE(p, " ocol0 = prev;\n"); + else*/ + + WRITE(p, " ocol0 = prev;\n"); } } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp index f36a732f3e..823cf01479 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderManager.cpp @@ -137,7 +137,7 @@ FRAGMENTSHADER* PixelShaderMngr::GetShader() Renderer::GetZBufferTarget() != 0, Renderer::GetRenderMode() != Renderer::RM_Normal); -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUGFAST) if (g_Config.iLog & CONF_SAVESHADERS && code) { static int counter = 0; char szTemp[MAX_PATH];