Flip uv.y

This commit is contained in:
Sean Lilley 2016-06-29 11:45:22 -04:00
parent d4131a956c
commit 96067deba1
1 changed files with 2 additions and 0 deletions

View File

@ -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