mirror of https://github.com/PCSX2/pcsx2.git
GSdx: less gaps between triangles, it was more noticeable with psx games, having a lower resolution.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4978 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
786f43a707
commit
9f470962e5
|
@ -410,15 +410,11 @@ void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW& edge, co
|
||||||
|
|
||||||
GSVector4 scissor = m_fscissor.xzxz();
|
GSVector4 scissor = m_fscissor.xzxz();
|
||||||
|
|
||||||
GSVector4 prestep = GSVector4(top) - y0;
|
|
||||||
|
|
||||||
GSVertexSW o = dedge * prestep;
|
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
if(IsOneOfMyScanlines(top))
|
if(IsOneOfMyScanlines(top))
|
||||||
{
|
{
|
||||||
GSVertexSW scan = edge + o;
|
GSVertexSW scan = edge + dedge * (GSVector4(top) - y0);
|
||||||
|
|
||||||
GSVector4 lrf = scan.p.ceil();
|
GSVector4 lrf = scan.p.ceil();
|
||||||
GSVector4 l = lrf.max(scissor);
|
GSVector4 l = lrf.max(scissor);
|
||||||
|
@ -434,17 +430,13 @@ void GSRasterizer::DrawTriangleSection(int top, int bottom, GSVertexSW& edge, co
|
||||||
{
|
{
|
||||||
m_stats.pixels += pixels;
|
m_stats.pixels += pixels;
|
||||||
|
|
||||||
prestep = l.xxxx() - x0;
|
GSVector4 prestep = l.xxxx() - x0;
|
||||||
|
|
||||||
AddScanline(e++, pixels, left, top, scan + dscan * prestep);
|
AddScanline(e++, pixels, left, top, scan + dscan * prestep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(++top >= bottom) break;
|
if(++top >= bottom) break;
|
||||||
|
|
||||||
// NOTE: it is more accurate to accumlate the offset, edge values (especially p.z) may become too large compared to dedge (example: 8000000 + 259.4 == 8000000 + 259.3)
|
|
||||||
|
|
||||||
o += dedge;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_edge.count += e - &m_edge.buff[m_edge.count];
|
m_edge.count += e - &m_edge.buff[m_edge.count];
|
||||||
|
|
Loading…
Reference in New Issue