diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-06-12 02:55:38 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2019-06-12 02:55:38 +0200 |
commit | ea5dc39e8335a7f8ba2dc0407035fd61cec138f4 (patch) | |
tree | 7ab83cca2ff80cfc1f953aebb75c2ee9901a983f | |
parent | a3fed77da315fa957e13bc13092087e1dfe91079 (diff) |
cheapass fix for texture positions, atleast effective at 1xIR
-rw-r--r-- | src/GPU3D_OpenGL_shaders.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/GPU3D_OpenGL_shaders.h b/src/GPU3D_OpenGL_shaders.h index 964981e..afe7518 100644 --- a/src/GPU3D_OpenGL_shaders.h +++ b/src/GPU3D_OpenGL_shaders.h @@ -128,10 +128,6 @@ void main() vec4 depthR = texelFetch(DepthBuffer, coord + ivec2(scale,0), 0); vec4 attrR = texelFetch(AttrBuffer, coord + ivec2(scale,0), 0); - /*if ((polyid != int(attrU.r * 63.0) && isless(depth.r, depthU.r)) || - (polyid != int(attrD.r * 63.0) && isless(depth.r, depthD.r)) || - (polyid != int(attrL.r * 63.0) && isless(depth.r, depthL.r)) || - (polyid != int(attrR.r * 63.0) && isless(depth.r, depthR.r)))*/ if (isgood(attrU, depthU.r, polyid, depth.r) || isgood(attrD, depthD.r, polyid, depth.r) || isgood(attrL, depthL.r, polyid, depth.r) || @@ -660,7 +656,7 @@ void main() int zshift = (attr >> 16) & 0x1F; vec4 fpos; - fpos.xy = ((vec2(vPosition.xy) * 2.0) / uScreenSize) - 1.0; + fpos.xy = (((vec2(vPosition.xy) + 0.5) * 2.0) / uScreenSize) - 1.0; fpos.z = (float(vPosition.z << zshift) / 8388608.0) - 1.0; fpos.w = float(vPosition.w) / 65536.0f; fpos.xyz *= fpos.w; @@ -683,7 +679,7 @@ void main() int zshift = (attr >> 16) & 0x1F; vec4 fpos; - fpos.xy = ((vec2(vPosition.xy) * 2.0) / uScreenSize) - 1.0; + fpos.xy = (((vec2(vPosition.xy) + 0.5) * 2.0) / uScreenSize) - 1.0; fZ = float(vPosition.z << zshift) / 16777216.0; fpos.w = float(vPosition.w) / 65536.0f; fpos.xy *= fpos.w; |