diff options
Diffstat (limited to 'src/mapblock_mesh.cpp')
-rw-r--r-- | src/mapblock_mesh.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index c871b6dbe..a9f14f8f0 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -1081,14 +1081,10 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data): material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; material.setTexture(0, p.tile.texture.atlas); - p.tile.applyMaterialOptions(material); - - if(enable_shaders){ - if(material.MaterialType == video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF) - material.MaterialType = shadermat1; - if(material.MaterialType == video::EMT_TRANSPARENT_VERTEX_ALPHA) - material.MaterialType = shadermat2; - } + if(enable_shaders) + p.tile.applyMaterialOptionsWithShaders(material, shadermat1, shadermat2); + else + p.tile.applyMaterialOptions(material); // Create meshbuffer |