-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
BasisTextureLoader example: the texture is rendered upside down #19797
Comments
All three.js built-in geometries have UVs matching our default of a. changes to the texture before compression In one case I've used a function like this: /** Invert UVs to be compatible with `flipY=false` textures. */
function flipY ( geometry ) {
var uv = geometry.attributes.uv;
for ( var i = 0; i < uv.count; i ++ ) {
uv.setY( i, 1 - uv.getY( i ) );
}
return geometry;
} This would apply to |
https://threejs.org/examples/webgl_loader_texture_basis.html Maybe this example should have a block of code that implements "fixing" the UVs, and use a texture that has an obvious right-side-up. |
@donmccurdy Thanks! |
In case anyone bumps into this in the future: |
... So the issue is: how to apply a
.basis
texture to a three.js built-in geometry./ping @zeux
/ping @takahirox
/ping @donmccurdy
The text was updated successfully, but these errors were encountered: