-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
Texture coordinate origin is undefined #674
Comments
Good catch.
We need to document this...it matches the JavaScript @lexaknyazev do you want to update the 1.0.1 spec for this? CC #15. |
You can't really define the coordinate system as "it matches the JavaScript Image object" If you define the origin to be top left, you will run in trouble with the fact A better option would be to define the origin to be the bottom left AND define This is effectively the same as using top left origin, does not brake any sample Later versions of glTF can add a way to set the pixel transfer behavior in the glTF file. ps. |
When texture source is
Currently, glTF has nor desktop/embedded profiles, neither proper support for traditional GPU textures (both compressed and uncompressed). So, I propose to add such clarification in Next glTF version shall have proper support for pixel storage/transfer options. |
@lexaknyazev I agree this can go into |
The spec does not seem to define the origin for the texture coordinates.
One would then assume that the origin is bottom left like it is the case with OpenGL,
but looking at the Duck.gltf from the sample models it seem that it uses top left origin.
Texture coordinate origin needs to be defined.
If bottom left if chosen, then the sample models need to be fixed.
If top left is chosen, then it needs to be documented, that an implementation that renders
using OpenGL might need to flip texture coordinates or images.
(Or in the case of WebGL set gl.UNPACK_FLIP_Y_WEBGL to true.)
The text was updated successfully, but these errors were encountered: