diff --git a/engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java b/engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java index cc8bd2834..a0573c2f8 100644 --- a/engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java +++ b/engine/src/tools/jme3tools/optimize/GeometryBatchFactory.java @@ -15,12 +15,10 @@ import com.jme3.scene.mesh.IndexBuffer; import com.jme3.texture.Texture; import com.jme3.util.BufferUtils; import com.jme3.util.IntMap.Entry; -import com.jme3.util.TangentBinormalGenerator; import java.nio.Buffer; import java.nio.FloatBuffer; import java.nio.ShortBuffer; import java.util.*; -import java.util.logging.Level; import java.util.logging.Logger; import jme3tools.optimize.TextureAtlas.TextureAtlasTile; @@ -358,6 +356,7 @@ public class GeometryBatchFactory { geom.setMesh(mesh); Material mat = new Material(mgr, "Common/MatDefs/Light/Lighting.j3md"); + mat.getAdditionalRenderState().setAlphaTest(true); Texture diffuseMap = atlas.getAtlasTexture("DiffuseMap"); Texture normalMap = atlas.getAtlasTexture("NormalMap"); Texture specularMap = atlas.getAtlasTexture("SpecularMap"); diff --git a/engine/src/tools/jme3tools/optimize/TextureAtlas.java b/engine/src/tools/jme3tools/optimize/TextureAtlas.java index 880c2ad34..6c3567235 100644 --- a/engine/src/tools/jme3tools/optimize/TextureAtlas.java +++ b/engine/src/tools/jme3tools/optimize/TextureAtlas.java @@ -183,13 +183,13 @@ public class TextureAtlas { image[i + 3] = sourceData.get(j + 3); //r } else if (source.getFormat() == Format.BGR8) { int j = (xPos + yPos * width) * 3; - image[i] = 0; //a + image[i] = 1; //a image[i + 1] = sourceData.get(j); //b image[i + 2] = sourceData.get(j + 1); //g image[i + 3] = sourceData.get(j + 2); //r } else if (source.getFormat() == Format.RGB8) { int j = (xPos + yPos * width) * 3; - image[i] = 0; //a + image[i] = 1; //a image[i + 1] = sourceData.get(j + 2); //b image[i + 2] = sourceData.get(j + 1); //g image[i + 3] = sourceData.get(j); //r