瀏覽代碼

[Atlas] Workaround MonoGame TextureProcessor bug.

MonoGame TextureProcessor overwrites existing mipmaps.
Nikos Kastellanos 6 年之前
父節點
當前提交
22a7bb37db
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. 12 1
      Content.Pipeline/AtlasImporter/Processors/TextureAtlasProcessor.cs

+ 12 - 1
Content.Pipeline/AtlasImporter/Processors/TextureAtlasProcessor.cs

@@ -122,7 +122,18 @@ namespace tainicom.Aether.Content.Pipeline
                 }
             }
             
-            base.Process(output, context);
+            // Workaround MonoGame TextureProcessor bug.
+            // MonoGame TextureProcessor overwrites existing mipmaps.
+            if (MipmapsPerSprite && GenerateMipmaps)
+            {
+                GenerateMipmaps = false;
+                base.Process(output, context);
+                GenerateMipmaps = true;
+            }
+            else
+            {
+                base.Process(output, context);
+            }
             
             return output;
         }