summaryrefslogtreecommitdiff
path: root/src/mapblock_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapblock_mesh.cpp')
-rw-r--r--src/mapblock_mesh.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index fdeb31f4d..cbc38ddb5 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mesh.h"
#include "content_mapblock.h"
#include "noise.h"
+#include "shader.h"
#include "settings.h"
#include "util/directiontables.h"
@@ -1011,6 +1012,8 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data):
Convert MeshCollector to SMesh
Also store animation info
*/
+ video::E_MATERIAL_TYPE shadermat = m_gamedef->getShaderSource()->
+ getShader("the_darkness_of_light").material;
for(u32 i = 0; i < collector.prebuffers.size(); i++)
{
PreMeshBuffer &p = collector.prebuffers[i];
@@ -1077,6 +1080,9 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data):
material.setTexture(0, p.tile.texture.atlas);
p.tile.applyMaterialOptions(material);
+ //if(material.MaterialType == video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF)
+ material.MaterialType = shadermat;
+
// Create meshbuffer
// This is a "Standard MeshBuffer",