Debugging materials...

This commit is contained in:
David Williams 2008-01-16 20:21:47 +00:00
parent c013b100a2
commit 4013e9143f
3 changed files with 36 additions and 4 deletions

View File

@ -1,4 +1,4 @@
material TextureAtlasMaterial
material TextureAtlasMultiMaterial
{
technique
{
@ -6,6 +6,8 @@ material TextureAtlasMaterial
{
ambient 0.0 0.0 0.0
diffuse 0.0 0.0 0.0
depth_bias -5 -5
}
pass
@ -28,9 +30,8 @@ material TextureAtlasMaterial
{
texture texture_atlas.png
filtering none
}
}
depth_bias 1 1
scene_blend add
}
}

View File

@ -0,0 +1,28 @@
material TextureAtlasSingleMaterial
{
technique
{
pass
{
vertex_program_ref TextureAtlasOneLightVertexProgram
{
param_named_auto world world_matrix
param_named_auto viewProj viewproj_matrix
param_named_auto ambient ambient_light_colour
param_named_auto light0.position light_position 0
param_named_auto light0.diffuseColour light_diffuse_colour 0
param_named_auto light0.attenuation light_attenuation 0
}
fragment_program_ref TextureAtlasFragmentProgram
{
}
texture_unit
{
texture texture_atlas.png
filtering none
}
}
}
}

View File

@ -181,7 +181,10 @@ namespace Ogre
{
//We have to create the surfaces
singleMaterialSurfacePatchRenderable = new SurfacePatchRenderable(singleMaterialPatch,materialMap->getMaterialAtIndex(1));
multiMaterialSurfacePatchRenderable = new SurfacePatchRenderable(multiMaterialPatch,materialMap->getMaterialAtIndex(1));
multiMaterialSurfacePatchRenderable = new SurfacePatchRenderable(multiMaterialPatch,materialMap->getMaterialAtIndex(2));
multiMaterialSurfacePatchRenderable->setRenderQueueGroup(RenderQueueGroupID::RENDER_QUEUE_3);
singleMaterialSurfacePatchRenderable->setRenderQueueGroup(RenderQueueGroupID::RENDER_QUEUE_4);
m_singleMaterialSurfaces[regionX][regionY][regionZ] = singleMaterialSurfacePatchRenderable;
sceneNode->attachObject(singleMaterialSurfacePatchRenderable);