(f6b392c84) Fixed TextureLoader.FromStream always premultiplying the alpha channel regardless of the value of the preMultiplyAlpha argument

This commit is contained in:
Joonas Rikkonen
2019-04-06 17:49:59 +03:00
parent 8cb5576955
commit 4359de7b7e
3 changed files with 4 additions and 142 deletions
@@ -81,7 +81,10 @@ namespace Barotrauma
try
{
var texture = Texture2D.FromStream(_graphicsDevice, fileStream);
PreMultiplyAlpha(ref texture);
if (preMultiplyAlpha)
{
PreMultiplyAlpha(ref texture);
}
return texture;
}
catch (Exception e)