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
Reproduce with:
fn main() { let gltf = gltf::Import::from_path("glTF-Sample-Models/2.0/Avocado/glTF/Avocado.gltf").sync().unwrap(); let mesh = gltf.meshes().nth(0).unwrap(); let primitive = mesh.primitives().nth(0).unwrap(); let mut tex_coords = vec![]; match primitive.tex_coords(0).unwrap() { gltf::mesh::TexCoords::U8(iter) => { for x in iter { tex_coords.push([x[0] as f32 / 255.0, x[1] as f32 / 255.0]); } }, gltf::mesh::TexCoords::U16(iter) => { for x in iter { tex_coords.push([x[0] as f32 / 65535.0, x[1] as f32 / 65535.0]); } }, gltf::mesh::TexCoords::F32(iter) => { for x in iter { tex_coords.push([x[0], x[1]]); } }, } println!("{:?}", tex_coords); }
Note that all the x[1] values are negative but otherwise valid in unit range.
x[1]
The text was updated successfully, but these errors were encountered:
Response from @lexaknyazev on Gitter:
UV coordinates wrapping follows OpenGL. Clients should use wrapping mode from sampler object (which could be omitted when default).
It looks like this isn't a bug after all.
Sorry, something went wrong.
No branches or pull requests
Reproduce with:
Note that all the
x[1]
values are negative but otherwise valid in unit range.The text was updated successfully, but these errors were encountered: