From 0989d4025613af9633424f8fc16b9b728205e0e2 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sat, 31 May 2014 18:51:22 -0400 Subject: [PATCH] * Ensure mipmapping is disabled for skies --- jme3-core/src/main/java/com/jme3/util/SkyFactory.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/util/SkyFactory.java b/jme3-core/src/main/java/com/jme3/util/SkyFactory.java index 082f199f4..7fb70e76f 100644 --- a/jme3-core/src/main/java/com/jme3/util/SkyFactory.java +++ b/jme3-core/src/main/java/com/jme3/util/SkyFactory.java @@ -129,6 +129,8 @@ public class SkyFactory { texture = new TextureCubeMap(); texture.setImage(img); } + texture.setMagFilter(Texture.MagFilter.Bilinear); + texture.setMinFilter(Texture.MinFilter.BilinearNoMipMaps); skyMat.setTexture("Texture", texture); sky.setMaterial(skyMat); @@ -269,7 +271,7 @@ public class SkyFactory { TextureCubeMap cubeMap = new TextureCubeMap(cubeImage); cubeMap.setAnisotropicFilter(0); cubeMap.setMagFilter(Texture.MagFilter.Bilinear); - cubeMap.setMinFilter(Texture.MinFilter.NearestNoMipMaps); + cubeMap.setMinFilter(Texture.MinFilter.BilinearNoMipMaps); cubeMap.setWrap(Texture.WrapMode.EdgeClamp); Material skyMat = new Material(assetManager, "Common/MatDefs/Misc/Sky.j3md"); @@ -290,8 +292,10 @@ public class SkyFactory { public static Spatial createSky(AssetManager assetManager, String textureName, boolean sphereMap) { TextureKey key = new TextureKey(textureName, true); - key.setGenerateMips(true); - key.setAsCube(!sphereMap); + key.setGenerateMips(false); + if (!sphereMap) { + key.setTextureTypeHint(Texture.Type.CubeMap); + } Texture tex = assetManager.loadTexture(key); return createSky(assetManager, tex, sphereMap); }