From a31eb24955d68f0f7c0a5427ad354ebb5b72f1b1 Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Wed, 28 Oct 2009 02:00:13 +0000 Subject: [PATCH] small commit,but should fix 2 big issues: * clear and flicker problem in d3d, backbuffer clearing was commented out, (if this was on right let me know and I'll revert). * alpha problem introduced by my modifications to the tev, must been sleeping when i wrote that code, should be fixed now. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4471 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 12 ++++++------ Source/Plugins/Plugin_VideoDX9/Src/Render.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index bfe971f3ad..607ae60101 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -898,12 +898,12 @@ void SampleTexture(char *&p, const char *destination, const char *texcoords, con static const char *tevAlphaFuncsTable[] = { "(false)", //ALPHACMP_NEVER 0 - "(prev.a < %s + %f)", //ALPHACMP_LESS 1 - "(abs( prev.a - %s ) <= %f)", //ALPHACMP_EQUAL 2 - "(prev.a <= %s + %f)", //ALPHACMP_LEQUAL 3 - "(prev.a > %s - %f)", //ALPHACMP_GREATER 4 - "(abs( prev.a - %s ) > %f)", //ALPHACMP_NEQUAL 5 - "(prev.a >= %s - %f)", //ALPHACMP_GEQUAL 6 + "(prev.a <= %s - %f)", //ALPHACMP_LESS 1 + "(abs( prev.a - %s ) < %f)", //ALPHACMP_EQUAL 2 + "(prev.a < %s + %f)", //ALPHACMP_LEQUAL 3 + "(prev.a >= %s + %f)", //ALPHACMP_GREATER 4 + "(abs( prev.a - %s ) >= %f)", //ALPHACMP_NEQUAL 5 + "(prev.a > %s - %f)", //ALPHACMP_GEQUAL 6 "(true)" //ALPHACMP_ALWAYS 7 }; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index f2393042ba..6f6aa210e6 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -286,7 +286,7 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc) //pSprite->End(); //pSprite->Release(); - //D3D::dev->Clear(0,NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(0,0,0),1.0f,0); + D3D::dev->Clear(0,NULL, D3DCLEAR_TARGET,D3DCOLOR_XRGB(0,0,0),1.0f,0); // todo, to draw the EFB texture to the backbuffer instead of StretchRect D3D::dev->StretchRect(FBManager::GetEFBColorRTSurface(), src_rect.AsRECT(),