Skip to content

Commit

Permalink
Set wrapMode = Clamp when loading from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoco007 committed Dec 31, 2023
1 parent b616685 commit e8e81ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/CustomAvatar/Utilities/BinaryReaderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e8e81ce

Please sign in to comment.