* Ensure mipmapping is disabled for skies

experimental
shadowislord 11 years ago
parent 99af4d9bd5
commit 0989d40256
  1. 10
      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);
}

Loading…
Cancel
Save