Skip to content

Commit

Permalink
invert KHR_texture_transform vScale, due to babylon using a bottom le…
Browse files Browse the repository at this point in the history
…ft texture coordinate origin, and glTF expecting a top left coordinate origin (BabylonJS#802)
  • Loading branch information
Drigax authored Apr 10, 2020
1 parent 11a4d29 commit 4f60137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SharedProjects/Babylon2GLTF/GLTFExporter.Texture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,9 @@ private void AddTextureTransformExtension(ref GLTF gltf, ref GLTFTextureInfo glt

KHR_texture_transform textureTransform = new KHR_texture_transform
{
offset = new float[] { babylonTexture.uOffset, babylonTexture.vOffset },
offset = new float[] { babylonTexture.uOffset, -babylonTexture.vOffset },
rotation = angle,
scale = new float[] { babylonTexture.uScale, babylonTexture.vScale },
scale = new float[] { babylonTexture.uScale, -babylonTexture.vScale },
texCoord = babylonTexture.coordinatesIndex
};

Expand Down

0 comments on commit 4f60137

Please sign in to comment.