alpha test material attr to fix transparent tile rendering (some cases)

This commit is contained in:
Gered 2013-11-10 13:21:29 -05:00
parent b79486172d
commit 22a8e6575e

View file

@ -5,6 +5,7 @@ import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.graphics.g3d.Renderable;
import com.badlogic.gdx.graphics.g3d.RenderableProvider;
import com.badlogic.gdx.graphics.g3d.materials.BlendingAttribute;
import com.badlogic.gdx.graphics.g3d.materials.FloatAttribute;
import com.badlogic.gdx.graphics.g3d.materials.Material;
import com.badlogic.gdx.graphics.g3d.materials.TextureAttribute;
import com.badlogic.gdx.math.Vector3;
@ -136,6 +137,7 @@ public class TileChunk extends TileContainer implements TileRawDataContainer, Re
opaqueMaterial.set(TextureAttribute.createDiffuse(tileMap.tileMeshes.atlas.texture));
alphaMaterial.set(TextureAttribute.createDiffuse(tileMap.tileMeshes.atlas.texture));
alphaMaterial.set(new BlendingAttribute());
alphaMaterial.set(FloatAttribute.createAlphaTest(0.0f));
}
public void updateVertices(ChunkVertexGenerator generator) {