only do lower-pixel rendering when rendering under an edge
This commit is contained in:
parent
d1781c8bf2
commit
77d0a0d76e
|
@ -1027,10 +1027,14 @@ void RenderPolygonScanline(RendererPolygon* rp, s32 y)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 dstattr = AttrBuffer[pixeladdr];
|
||||||
|
|
||||||
// if depth test against the topmost pixel fails, test
|
// if depth test against the topmost pixel fails, test
|
||||||
// against the pixel underneath
|
// against the pixel underneath
|
||||||
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
||||||
{
|
{
|
||||||
|
if (!(dstattr & 0x3)) continue;
|
||||||
|
|
||||||
pixeladdr += 258;
|
pixeladdr += 258;
|
||||||
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
||||||
continue;
|
continue;
|
||||||
|
@ -1096,7 +1100,6 @@ void RenderPolygonScanline(RendererPolygon* rp, s32 y)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
u32 dstattr = AttrBuffer[pixeladdr];
|
|
||||||
attr |= (1<<30);
|
attr |= (1<<30);
|
||||||
if (polygon->IsShadow) dstattr |= (1<<30);
|
if (polygon->IsShadow) dstattr |= (1<<30);
|
||||||
|
|
||||||
|
@ -1148,10 +1151,14 @@ void RenderPolygonScanline(RendererPolygon* rp, s32 y)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 dstattr = AttrBuffer[pixeladdr];
|
||||||
|
|
||||||
// if depth test against the topmost pixel fails, test
|
// if depth test against the topmost pixel fails, test
|
||||||
// against the pixel underneath
|
// against the pixel underneath
|
||||||
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
||||||
{
|
{
|
||||||
|
if (!(dstattr & 0x3)) continue;
|
||||||
|
|
||||||
pixeladdr += 258;
|
pixeladdr += 258;
|
||||||
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
||||||
continue;
|
continue;
|
||||||
|
@ -1244,10 +1251,14 @@ void RenderPolygonScanline(RendererPolygon* rp, s32 y)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 dstattr = AttrBuffer[pixeladdr];
|
||||||
|
|
||||||
// if depth test against the topmost pixel fails, test
|
// if depth test against the topmost pixel fails, test
|
||||||
// against the pixel underneath
|
// against the pixel underneath
|
||||||
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
||||||
{
|
{
|
||||||
|
if (!(dstattr & 0x3)) continue;
|
||||||
|
|
||||||
pixeladdr += 258;
|
pixeladdr += 258;
|
||||||
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
if (!fnDepthTest(DepthBuffer[pixeladdr], z))
|
||||||
continue;
|
continue;
|
||||||
|
@ -1313,7 +1324,6 @@ void RenderPolygonScanline(RendererPolygon* rp, s32 y)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
u32 dstattr = AttrBuffer[pixeladdr];
|
|
||||||
attr |= (1<<30);
|
attr |= (1<<30);
|
||||||
if (polygon->IsShadow) dstattr |= (1<<30);
|
if (polygon->IsShadow) dstattr |= (1<<30);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue