Explorar o código

postprocessing target textures: always use nearest filtering
* There's almost never a good reason to use linear filtering for postprocess textures
* If it is really required, it should be enabled explicitly

shadowislord %!s(int64=10) %!d(string=hai) anos
pai
achega
a4d06305d5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      jme3-core/src/main/java/com/jme3/texture/Texture2D.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/texture/Texture2D.java

@@ -60,7 +60,7 @@ public class Texture2D extends Texture {
     public Texture2D(Image img){
         super();
         setImage(img);
-        if (img.getFormat().isDepthFormat()){
+        if (img.getData(0) == null) {
             setMagFilter(MagFilter.Nearest);
             setMinFilter(MinFilter.NearestNoMipMaps);
         }