From e8e81ce4f6a30155961ef8e48c7d6e04dcb2874d Mon Sep 17 00:00:00 2001 From: Nicolas Gnyra Date: Sat, 30 Dec 2023 20:48:09 -0500 Subject: [PATCH] Set wrapMode = Clamp when loading from cache --- Source/CustomAvatar/Utilities/BinaryReaderExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/CustomAvatar/Utilities/BinaryReaderExtensions.cs b/Source/CustomAvatar/Utilities/BinaryReaderExtensions.cs index 9867087e..e95ec13b 100644 --- a/Source/CustomAvatar/Utilities/BinaryReaderExtensions.cs +++ b/Source/CustomAvatar/Utilities/BinaryReaderExtensions.cs @@ -52,7 +52,10 @@ private static Texture2D BytesToTexture2D(int width, int height, GraphicsFormat { if (bytes.Length == 0) return null; - var texture = new Texture2D(width, height, graphicsFormat, mipCount, TextureCreationFlags.MipChain); + var texture = new Texture2D(width, height, graphicsFormat, mipCount, TextureCreationFlags.MipChain) + { + wrapMode = TextureWrapMode.Clamp, + }; texture.LoadRawTextureData(bytes); texture.Apply();