From c4c809f6b1bd40f945ab12e7b5adbb4b4e0998fc Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Tue, 19 Jan 2010 15:00:45 +0000 Subject: Small fixes: in opengl correct an error introduced by mi in efb to ram alignment, it's seems to fix SMS but it missalign a lot of other games, so revert to the default. must solve truncated coins in NSMB. revert alpha testing values to the values in rev 4812 as they fix some games. in d3d dynamized the Render target size so it will change at runtime when viewport exceed it size, in the worse case it will cause a missing frame when resizing but in the games I tested is not noticeable at all This must solve all the remaining viewports problems in nvidia cards, in ati this is not needed. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4888 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 12 ++++++------ Source/Core/VideoCommon/Src/TextureConversionShader.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index 54a433d71c..97eff04756 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -871,12 +871,12 @@ void SampleTexture(char *&p, const char *destination, const char *texcoords, con static const char *tevAlphaFuncsTable[] = { "(false)", //ALPHACMP_NEVER 0 - "(prev.a <= %s - (0.5f/255.0f))", //ALPHACMP_LESS 1 - "(abs( prev.a - %s ) < (1.0f/255.0f))", //ALPHACMP_EQUAL 2 - "(prev.a < %s + (0.5f/255.0f))", //ALPHACMP_LEQUAL 3 - "(prev.a >= %s + (0.5f/255.0f))", //ALPHACMP_GREATER 4 - "(abs( prev.a - %s ) >= (1.0f/255.0f))", //ALPHACMP_NEQUAL 5 - "(prev.a > %s - (0.5f/255.0f))", //ALPHACMP_GEQUAL 6 + "(prev.a <= %s - (0.25f/255.0f))", //ALPHACMP_LESS 1 + "(abs( prev.a - %s ) < (0.5f/255.0f))", //ALPHACMP_EQUAL 2 + "(prev.a < %s + (0.25f/255.0f))", //ALPHACMP_LEQUAL 3 + "(prev.a >= %s + (0.25f/255.0f))", //ALPHACMP_GREATER 4 + "(abs( prev.a - %s ) >= (0.5f/255.0f))", //ALPHACMP_NEQUAL 5 + "(prev.a > %s - (0.25f/255.0f))", //ALPHACMP_GEQUAL 6 "(true)" //ALPHACMP_ALWAYS 7 }; diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp index eb6b83e234..8c8a75b403 100644 --- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp @@ -116,7 +116,7 @@ void WriteSwizzler(char*& p, u32 format,bool HLSL) } else { - WRITE(p, " sampleUv = sampleUv + float2(1.0f,-1.0f);\n"); + WRITE(p, " sampleUv = sampleUv;\n"); } } -- cgit v1.2.3