From dfb12351333dc3deb47f5c33212d7be7d2ac94d7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 14 Mar 2020 18:47:19 -0400 Subject: fix semi-transparency issues on Linux/Mac Apparently Mono no longer premultiplies loaded PNGs by default. --- src/SMAPI/Framework/ContentManagers/ModContentManager.cs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/SMAPI/Framework/ContentManagers') diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs index 4ffe3acd..fda80a83 100644 --- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs +++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs @@ -241,13 +241,6 @@ namespace StardewModdingAPI.Framework.ContentManagers /// Based on code by David Gouveia. private Texture2D PremultiplyTransparency(Texture2D texture) { - // Textures loaded by Texture2D.FromStream are already premultiplied on Linux/Mac, even - // though the XNA documentation explicitly says otherwise. That's a glitch in MonoGame - // fixed in newer versions, but the game uses a bundled version that will always be - // affected. See https://github.com/MonoGame/MonoGame/issues/4820 for more info. - if (Constants.TargetPlatform != GamePlatform.Windows) - return texture; - // premultiply pixels Color[] data = new Color[texture.Width * texture.Height]; texture.GetData(data); -- cgit