From 96067deba1e195d2c77383607cf5454da5d1a325 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Wed, 29 Jun 2016 11:45:22 -0400 Subject: [PATCH] Flip uv.y --- lib/obj.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/obj.js b/lib/obj.js index aa868f9..d8e11dc 100644 --- a/lib/obj.js +++ b/lib/obj.js @@ -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