aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-04-29 19:13:20 +0200
committerArisotura <thetotalworm@gmail.com>2019-04-29 19:13:20 +0200
commit88bc76545504a8284f6810d996c2a0d9706e6915 (patch)
treec113c3956d90be5ad53f6f219ab5c9dffe1af099 /src
parentffa0ddd94c6c3887de574214872e3185ea027e99 (diff)
don't lose half the zbuffer range
Diffstat (limited to 'src')
-rw-r--r--src/GPU3D_OpenGL43.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/GPU3D_OpenGL43.cpp b/src/GPU3D_OpenGL43.cpp
index 21a77c1..0197546 100644
--- a/src/GPU3D_OpenGL43.cpp
+++ b/src/GPU3D_OpenGL43.cpp
@@ -328,7 +328,7 @@ void main()
vec4 fpos;
fpos.x = ((float(vPosition.x) * 2.0) / 256.0) - 1.0;
fpos.y = ((float(vPosition.y) * 2.0) / 192.0) - 1.0;
- fpos.z = float(vPosition.z << zshift) / 16777216.0;
+ fpos.z = (float(vPosition.z << zshift) / 8388608.0) - 1.0;
fpos.w = float(vPosition.w) / 65536.0f;
fpos.xyz *= fpos.w;