Skip to content

Commit 09b958b

Browse files
committed
Updated texture export warning for non uniform scaling and rotation.
1 parent 01c2792 commit 09b958b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

3ds Max/Max2Babylon/Exporter/BabylonExporter.Texture.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,10 +779,11 @@ private IStdUVGen _exportUV(IStdUVGen uvGen, BabylonTexture babylonTexture)
779779
babylonTexture.vScale *= -1; // Need to invert Y-axis for DDS texture
780780
}
781781

782-
// TODO - rotation and scale
783-
if (babylonTexture.wAng != 0f && (babylonTexture.uScale != 1f || babylonTexture.vScale != 1f))
782+
if (babylonTexture.wAng != 0f
783+
&& (babylonTexture.uScale != 1f || babylonTexture.vScale != 1f)
784+
&& (Math.Abs(babylonTexture.uScale) - Math.Abs(babylonTexture.vScale)) > float.Epsilon)
784785
{
785-
RaiseWarning("Rotation and tiling (scale) on a texture are only supported separatly. You can use the map UV of the mesh for those transformation.", 3);
786+
RaiseWarning("Rotation and non-uniform tiling (scale) on a texture is not supported as it will cause texture shearing. You can use the map UV of the mesh for those transformations.", 3);
786787
}
787788

788789

0 commit comments

Comments
 (0)