From 886bbc08b061c65e37fa1df266fc38df20f8ce8e Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Sun, 3 May 2015 15:19:30 -0400 Subject: [PATCH] MipMapGenerator: perform scaling in sRGB - Incorrect, but faster. In most cases where it is used, gamma correct pipeline isn't used and performance is of higher priority than quality. --- jme3-core/src/main/java/com/jme3/util/MipMapGenerator.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 6bdfb6e65..3ac6a7ecd 100644 --- a/jme3-core/src/main/java/com/jme3/util/MipMapGenerator.java +++ b/jme3-core/src/main/java/com/jme3/util/MipMapGenerator.java @@ -53,10 +53,8 @@ public class MipMapGenerator { buffer, inputImage.getColorSpace()); - // Perform scaling in linear colorspace for higher quality. - // However it requires a lot of pow() calls.. - ImageRaster input = ImageRaster.create(inputImage, 0, 0, true); - ImageRaster output = ImageRaster.create(outputImage, 0, 0, true); + ImageRaster input = ImageRaster.create(inputImage, 0, 0, false); + ImageRaster output = ImageRaster.create(outputImage, 0, 0, false); float xRatio = ((float)(input.getWidth() - 1)) / output.getWidth(); float yRatio = ((float)(input.getHeight() - 1)) / output.getHeight();