mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-27 02:24:04 -05:00
Flip uv.y
This commit is contained in:
parent
d4131a956c
commit
96067deba1
@ -105,6 +105,8 @@ function processObj(objFile, info, materials, images, done) {
|
||||
var ui = getOffset(u, uvs, 2);
|
||||
var ux = uvs[ui + 0];
|
||||
var uy = uvs[ui + 1];
|
||||
// Flip y so 0.0 is the bottom of the image
|
||||
uy = 1.0 - uy;
|
||||
vertexArray.push(ux, uy);
|
||||
} else {
|
||||
// Some objects in the model may not have uvs, fill with 0's for consistency
|
||||
|
Loading…
Reference in New Issue
Block a user