Skip to content

Commit

Permalink
for OGL renderer W buffer rendering avoid undefined vertex z
Browse files Browse the repository at this point in the history
see #2017
  • Loading branch information
RSDuck committed Nov 9, 2024
1 parent 8e3f6cc commit 4528441
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/GPU3D_OpenGL_shaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ void main()
vec4 fpos;
fpos.xy = (((vec2(vPosition.xy) ) * 2.0) / uScreenSize) - 1.0;
fpos.z = 0.0;
fZ = float(vPosition.z << zshift) / 16777216.0;
fpos.w = float(vPosition.w) / 65536.0f;
fpos.xy *= fpos.w;
Expand Down

0 comments on commit 4528441

Please sign in to comment.