OpenGL fovx question

Posted by Nick on Game Development See other posts from Game Development or by Nick
Published on 2012-11-17T19:44:53Z Indexed on 2012/11/17 23:23 UTC
Read the original article Hit count: 326

Filed under:
|

To boil my question down to the simplest form, I fear I am oversimplifying how mat4 perspective works. I am using

mat4.perspective(45, 2, 0.1, 1000.0)

(the binding is WebGL fwiw). With a fovy of 45, and an aspect ratio of 2, I expect to have a fovx of 90. Thus, if I position my camera at (0, 0, 50), looking towards the origin, I expect to see a cube positioned at (50, 0, 0) (45 degrees) right at the very periphery of my screen, half on, half off,. Instead, a cube at (50, 0, 0) is totally off screen, and my actually periphery occurs at about (41.1, 0, 0).

What am I missing here?

Thanks, nick

© Game Development or respective owner

Related posts about opengl

Related posts about perspective