Skip to content

Commit

Permalink
assign default values for texture only when a texture actually exists
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Aug 26, 2023
1 parent 7a2bb5a commit 8d0c09c
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,14 @@ async Task<Texture2D> CheckMimeTypeAndLoadImage(GLTFImage image, Texture2D textu
break;
}

texture.wrapMode = TextureWrapMode.Repeat;
texture.wrapModeV = TextureWrapMode.Repeat;
texture.wrapModeU = TextureWrapMode.Repeat;
texture.filterMode = FilterMode.Trilinear;
// assign default values
if (texture)
{
texture.wrapMode = TextureWrapMode.Repeat;
texture.wrapModeV = TextureWrapMode.Repeat;
texture.wrapModeU = TextureWrapMode.Repeat;
texture.filterMode = FilterMode.Bilinear;
}

await Task.CompletedTask;
return texture;
Expand Down

0 comments on commit 8d0c09c

Please sign in to comment.