aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-10-04 02:47:49 +0200
committerStapleButter <thetotalworm@gmail.com>2017-10-04 02:47:49 +0200
commit5b71ffceee18a38dc81bb95a4001cb22f878f300 (patch)
tree90800264bbb43d0783d1b5344b69b323de11c5a3 /src
parent9125620ff177c01f78f745ff85a28574796d1e39 (diff)
minor fix
Diffstat (limited to 'src')
-rw-r--r--src/GPU3D.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp
index 988b92b..0b68706 100644
--- a/src/GPU3D.cpp
+++ b/src/GPU3D.cpp
@@ -886,10 +886,10 @@ void SubmitPolygon()
s32 z;
if (FlushAttributes & 0x2)
z = wshifted;
- else if (wshifted)
+ else if (vtx->Position[3])
z = ((((s64)vtx->Position[2] * 0x4000) / vtx->Position[3]) + 0x3FFF) * 0x200;
else
- z = 0x3FFF;
+ z = 0x7FFE00;
// checkme (Z<0 shouldn't be possible, but Z>0xFFFFFF is possible)
if (z < 0) z = 0;