diff --git a/jme3-core/src/main/java/com/jme3/util/MipMapGenerator.java b/jme3-core/src/main/java/com/jme3/util/MipMapGenerator.java index e7a33da3c..6bdfb6e65 100644 --- a/jme3-core/src/main/java/com/jme3/util/MipMapGenerator.java +++ b/jme3-core/src/main/java/com/jme3/util/MipMapGenerator.java @@ -100,8 +100,7 @@ public class MipMapGenerator { public static Image resizeToPowerOf2(Image original){ int potWidth = FastMath.nearestPowerOfTwo(original.getWidth()); int potHeight = FastMath.nearestPowerOfTwo(original.getHeight()); - int potSize = Math.max(potWidth, potHeight); - return scaleImage(original, potSize, potSize); + return scaleImage(original, potWidth, potHeight); } public static void generateMipMaps(Image image){