I just took a look at the glm source for projection
(gluPerspective equivalent) and noticed that the
fovy is divided by two in the tan calculation:
valType range = tan(radians(fovy / valType(2))) * zNear;
I guess range should be the half_height of the near
clipping plane so first I thought it is ok to divide by 2.
But then I remembered that fovy is already the half of the
fov (e.g. we pass 45.0f to the function instead of 90.0f).
So maybe someone can explain this additional division
by two inside glm::perspective?
This is the gluPerspective equivalent:
ymax = tanf(fovyInDegrees * 2.0 * M_PI / 360.0) * znear;
Here everything makes sense for me, we convert to radians
with (2*PI/360.0) but we don’t divide by 2 since
fovyInDegrees is already the half of our fov.
Or am I completely nuts?
Please enlighten me Thanks!