GSDX: Removed the collapsing of ge/g and le/l alpha tests in the shader code and the supporting code in the C++. This was presumably intended to reduce the number of shaders needed but a) this was never actually implemented, b) a single developer will generally not mix the functionally equivalent (with a different AREF) greater/less than with greater/less than or equal to in GS techniques, c) it really wouldn't make much of a difference to performance anyway and d) it would make an experimental change I'm working with more complicated and slower.

No change in functionality expected.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5343 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1@gmail.com 2012-07-23 16:39:56 +00:00
parent 1f8c4ddc22
commit 8a8d3c67d4
2 changed files with 13 additions and 35 deletions

View File

@ -252,26 +252,12 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
}
if(context->TEST.ATE)
{
ps_sel.atst = context->TEST.ATST;
switch(ps_sel.atst)
{
case ATST_LESS:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF - 1);
break;
case ATST_GREATER:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF + 1);
break;
default:
ps_cb.FogColor_AREF.a = (float)(int)context->TEST.AREF;
break;
}
}
else
{
ps_sel.atst = ATST_ALWAYS;
}
if (context->TEST.ATE && context->TEST.ATST > 1)
ps_cb.FogColor_AREF.a = (float)context->TEST.AREF;
if(tex)
{
@ -376,19 +362,6 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
ps_sel.atst = iatst[ps_sel.atst];
switch(ps_sel.atst)
{
case ATST_LESS:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF - 1);
break;
case ATST_GREATER:
ps_cb.FogColor_AREF.a = (float)((int)context->TEST.AREF + 1);
break;
default:
ps_cb.FogColor_AREF.a = (float)(int)context->TEST.AREF;
break;
}
dev->SetupPS(ps_sel, &ps_cb, ps_ssel);
bool z = om_dssel.zwe;

View File

@ -519,19 +519,24 @@ void atst(float4 c)
else if(PS_ATST == 2) // l
{
#if PS_SPRITEHACK == 0
clip(AREF - a);
clip(AREF - a - 0.5f);
#endif
}
else if(PS_ATST == 3) // le
{
clip(AREF - a);
clip(AREF - a + 0.5f);
}
else if(PS_ATST == 4) // e
{
clip(0.5f - abs(a - AREF)); }
else if(PS_ATST == 5 || PS_ATST == 6) // ge, g
clip(0.5f - abs(a - AREF));
}
else if(PS_ATST == 5) // ge
{
clip(a - AREF);
clip(a - AREF + 0.5f);
}
else if(PS_ATST == 6) // g
{
clip(a - AREF - 0.5f);
}
else if(PS_ATST == 7) // ne
{