paroj / gltut

Learning Modern 3D Graphics Programming
https://paroj.github.io/gltut/
MIT License
1.57k stars 377 forks source link

Tutorial 4 - Z Offset Issue #62

Closed paroj closed 8 years ago

paroj commented 11 years ago

Originally reported by: Jonanin (Bitbucket: Jonanin, GitHub: Unknown)


Hi,

In tutorial 4, I'm copying the OrthoCube vertex data, and it appears there is an issue with the z positioning of the object. In my test, it doesn't display unless I had 1.0 to the z value in the vertex shader. It uses Z values -0.75 and 0.75, which is on either side of the camera, is it not?


paroj commented 11 years ago

Original comment by Jason McKesson (Bitbucket: alfonse, GitHub: alfonse):


The near clipping plane for a pure orthographic projection starts at -1.0 and ends at 1.0. So the object should be visible.