From e89e2d16ee5fb11a677d6f594f47c619bd33c4f9 Mon Sep 17 00:00:00 2001 From: Player 0 <54979825+zl3388@users.noreply.github.com> Date: Sat, 11 Jan 2020 01:51:32 +0800 Subject: [PATCH] Fixed wrap mode of exported texture . (#544) --- .../Assets/UnityGLTF/Runtime/Scripts/GLTFSceneExporter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnityGLTF/Assets/UnityGLTF/Runtime/Scripts/GLTFSceneExporter.cs b/UnityGLTF/Assets/UnityGLTF/Runtime/Scripts/GLTFSceneExporter.cs index 468a850d2..a63448de5 100644 --- a/UnityGLTF/Assets/UnityGLTF/Runtime/Scripts/GLTFSceneExporter.cs +++ b/UnityGLTF/Assets/UnityGLTF/Runtime/Scripts/GLTFSceneExporter.cs @@ -1955,8 +1955,8 @@ public SamplerId GetSamplerId(GLTFRoot root, Texture textureObj) || textureObj.filterMode == FilterMode.Trilinear && root.Samplers[i].MinFilter == MinFilterMode.LinearMipmapLinear; bool wrapMatched = textureObj.wrapMode == TextureWrapMode.Clamp && root.Samplers[i].WrapS == WrapMode.ClampToEdge - || textureObj.wrapMode == TextureWrapMode.Repeat && root.Samplers[i].WrapS != WrapMode.Repeat - || textureObj.wrapMode == TextureWrapMode.Mirror && root.Samplers[i].WrapS != WrapMode.MirroredRepeat; + || textureObj.wrapMode == TextureWrapMode.Repeat && root.Samplers[i].WrapS == WrapMode.Repeat + || textureObj.wrapMode == TextureWrapMode.Mirror && root.Samplers[i].WrapS == WrapMode.MirroredRepeat; if (filterMatched && wrapMatched) {