Open
Description
In Numeric.Matrix: perspective
and orthogonal
currently follow OpenGL conventions. They require negative near
and far
values, otherwise they produce bogus Z values and messed up signs. The haddock comment on perspective
states "Near plane clipping distance (always positive)" which is wrong. I suppose the OpenGL convention sees them as z-coordinates of the planes in screen space instead of distances to the camera.
They also project onto Z values from -1 to 1. For Vulkan, they need to produce a Z range from 0 to 1.
The GLM library has different defines for those variants, but I don't believe compile time flags are a good solution. I suggest splitting the projections up into variants and naming them accordingly.
Metadata
Metadata
Assignees
Labels
No labels