fix display capture. dumb bug of the year.
This commit is contained in:
parent
96b471d729
commit
60cdc7d6f7
|
@ -547,7 +547,7 @@ void GPU2D::DoCapture(u32 line, u32 width, u32* src)
|
||||||
dstaddr &= 0xFFFF;
|
dstaddr &= 0xFFFF;
|
||||||
srcBaddr &= 0xFFFF;
|
srcBaddr &= 0xFFFF;
|
||||||
|
|
||||||
switch ((DispCnt >> 29) & 0x3)
|
switch ((CaptureCnt >> 29) & 0x3)
|
||||||
{
|
{
|
||||||
case 0: // source A
|
case 0: // source A
|
||||||
{
|
{
|
||||||
|
|
|
@ -620,7 +620,7 @@ void SubmitPolygon()
|
||||||
normalX = (((s64)v0->Position[1] * v2->Position[3]) - ((s64)v0->Position[3] * v2->Position[1])) >> 12;
|
normalX = (((s64)v0->Position[1] * v2->Position[3]) - ((s64)v0->Position[3] * v2->Position[1])) >> 12;
|
||||||
normalY = (((s64)v0->Position[3] * v2->Position[0]) - ((s64)v0->Position[0] * v2->Position[3])) >> 12;
|
normalY = (((s64)v0->Position[3] * v2->Position[0]) - ((s64)v0->Position[0] * v2->Position[3])) >> 12;
|
||||||
normalZ = (((s64)v0->Position[0] * v2->Position[1]) - ((s64)v0->Position[1] * v2->Position[0])) >> 12;
|
normalZ = (((s64)v0->Position[0] * v2->Position[1]) - ((s64)v0->Position[1] * v2->Position[0])) >> 12;
|
||||||
dot = ((s64)(v1->Position[0] >> 0) * normalX) + ((s64)(v1->Position[1] >> 0) * normalY) + ((s64)(v1->Position[3] >> 0) * normalZ);
|
dot = ((s64)v1->Position[0] * normalX) + ((s64)v1->Position[1] * normalY) + ((s64)v1->Position[3] * normalZ);
|
||||||
|
|
||||||
bool facingview = (dot < 0);
|
bool facingview = (dot < 0);
|
||||||
|
|
||||||
|
@ -805,6 +805,7 @@ void SubmitPolygon()
|
||||||
|
|
||||||
// determine bounds of the polygon
|
// determine bounds of the polygon
|
||||||
// also determine the W shift and normalize W
|
// also determine the W shift and normalize W
|
||||||
|
// TODO: normalization works both ways
|
||||||
|
|
||||||
u32 vtop = 0, vbot = 0;
|
u32 vtop = 0, vbot = 0;
|
||||||
s32 ytop = 192, ybot = 0;
|
s32 ytop = 192, ybot = 0;
|
||||||
|
|
Loading…
Reference in New Issue