I'm back, after two weeks pure work and nothing of dolphin, take a look at the code and discover this very small fix, apply color clamping before alpha test, the way is done in the software plugin, have some nice effects, this will fix some things and brake others but the feedback is needed.

if you want to know where to start testing look at SMS :)
HAPPY 2010 for everyone 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4775 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado 2010-01-02 21:09:12 +00:00
parent f3f7ce1be6
commit ded7a2921d

View File

@ -537,6 +537,7 @@ const char *GeneratePixelShader(u32 texture_mask, bool dstAlphaEnable, u32 HLSL)
}
WRITE(p, "depth = zCoord;\n");
WRITE(p, "prev = saturate(prev);\n");
//if (bpmem.genMode.numindstages ) WRITE(p, "prev.rg = indtex0.xy;\nprev.b = 0;\n");
@ -853,17 +854,15 @@ void SampleTexture(char *&p, const char *destination, const char *texcoords, con
static const char *tevAlphaFuncsTable[] =
{
"(false)", //ALPHACMP_NEVER 0
"(prev.a < %s - (1.0f/510.0f))", //ALPHACMP_LESS 1
"(prev.a < %s - (0.5f/255.0f))", //ALPHACMP_LESS 1
"(abs( prev.a - %s ) < (1.0f/255.0f))", //ALPHACMP_EQUAL 2
"(prev.a < %s + (1.0f/510.0f))", //ALPHACMP_LEQUAL 3
"(prev.a > %s + (1.0f/510.0f))", //ALPHACMP_GREATER 4
"(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 - (1.0f/510.0f))", //ALPHACMP_GEQUAL 6
"(prev.a > %s - (0.5f/255.0f))", //ALPHACMP_GEQUAL 6
"(true)" //ALPHACMP_ALWAYS 7
};
static const char *tevAlphaFunclogicTable[] =
{
" && ", // and