We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading a model from https://poly.google.com/view/9Vq_-HEtIHA (downloaded version using "Updated GLTF file") raises an error
Invalid GLTF document, missing "zfar" field
Indeed, glTF file doesn't specify zfar:
"cameras" : [ { "perspective" : { "yfov" : 0.7853981633974483, "znear" : 0.1000000014901161 }, "type" : "perspective" } ],
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 Required function,
Required
result.fPerspective.fZFar:=TPasJSON.GetNumber(Required(....
on https://github.com/BeRo1985/pasgltf/blob/master/src/PasGLTF.pas#L4050 .
Also aspectRatio is not required, according to the glTF 2.0 specification, but PasGLTF code makes it required.
aspectRatio
Note that zfar is still required for orthographic cameras, which may explain why this bug appeared :)
zfar
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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
Required
function,on https://github.com/BeRo1985/pasgltf/blob/master/src/PasGLTF.pas#L4050 .
Also
aspectRatio
is not required, according to the glTF 2.0 specification, but PasGLTF code makes it required.Note that
zfar
is still required for orthographic cameras, which may explain why this bug appeared :)The text was updated successfully, but these errors were encountered: