For perspective camera, specifying zfar is not required #4
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BeRo1985/pasgltf#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Loading a model from https://poly.google.com/view/9Vq_-HEtIHA (downloaded version using "Updated GLTF file") raises an error
Indeed, glTF file doesn't specify zfar:
Looking at glTF 2.0 specification, zfar is not required for perspective cameras: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-perspective . It says "Required: No" and "If zfar is undefined, runtime must use infinite projection matrix." . But PasGLTF requires it, by reading it through
Requiredfunction,on https://github.com/BeRo1985/pasgltf/blob/master/src/PasGLTF.pas#L4050 .
Also
aspectRatiois not required, according to the glTF 2.0 specification, but PasGLTF code makes it required.Note that
zfaris still required for orthographic cameras, which may explain why this bug appeared :)