1
0
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:
Kahrl
2012-03-19 02:59:12 +01:00
committed by Perttu Ahola
parent e3258b78e2
commit 22e6fb7056
15 changed files with 945 additions and 2 deletions

View File

@@ -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",