Explorar o código

[Atlas] Workaround MonoGame TextureProcessor bug.

MonoGame TextureProcessor overwrites existing mipmaps.
Nikos Kastellanos %!s(int64=6) %!d(string=hai) anos
pai
achega
22a7bb37db

+ 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;
             return output;
         }
         }