mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
ShaderSource and silly example shaders
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user