little fix for issue 3976.

some optimization for vertex color loading, please test  for any change in game color, this is a optimization so nothing should change :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6908 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2011-01-24 21:26:39 +00:00
parent d2544158df
commit 470ed118f5
3 changed files with 32 additions and 40 deletions

View File

@ -567,7 +567,7 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
if (!Pretest)
{
// alpha test will always fail, so restart the shader and just make it an empty function
WRITE(p, "ocol0 = 0;\n");
WRITE(p, "ocol0 = float4(0.0f,0.0f,0.0f,0.0f);\n");
if(DepthTextureEnable)
WRITE(p, "depth = 1.f;\n");
WRITE(p, "discard;\n");
@ -798,7 +798,7 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
{
// alpha test will always fail, so restart the shader and just make it an empty function
p = pmainstart;
WRITE(p, "ocol0 = 0;\n");
WRITE(p, "ocol0 = float4(0.0f,0.0f,0.0f,0.0f);\n");
if(DepthTextureEnable)
WRITE(p, "depth = 1.f;\n");
WRITE(p, "discard;\n");
@ -1305,7 +1305,7 @@ static bool WriteAlphaTest(char *&p, API_TYPE ApiType)
compindex = bpmem.alphaFunc.comp1 % 8;
WRITE(p, tevAlphaFuncsTable[compindex],alphaRef[1]);//lookup the second component from the alpha function table
WRITE(p, ")){ocol0 = 0;%sdiscard;%s}\n",DepthTextureEnable ? "depth = 1.f;" : "",(ApiType != API_D3D11)? "return;" : "");
WRITE(p, ")){ocol0 = float4(0.0f,0.0f,0.0f,0.0f);%sdiscard;%s}\n",DepthTextureEnable ? "depth = 1.f;" : "",(ApiType != API_D3D11)? "return;" : "");
return true;
}