luis
16-06-2008 20:32:00
Hello!
I want to apply a texture has a mask/guide and use alpha blending to control how much is it visible over the terrain.
I'm trying this with no results (I see nothing):
any idea?
thanks.
I want to apply a texture has a mask/guide and use alpha blending to control how much is it visible over the terrain.
I'm trying this with no results (I see nothing):
std::string lightMapFile = "./media/gbeditor/mask.png";
std::ifstream test( lightMapFile.c_str(), std::ios::in );
if( !test.fail() )
{
test.close();
MaterialPtr material( MaterialManager::getSingleton().getByName("ETTerrainMaterial") );
Pass *p = material->getTechnique(0)->createPass();
TextureUnitState * tu = p->createTextureUnitState( lightMapFile );
p->setSceneBlending( SBT_MODULATE );
p->getTextureUnitState(0)->setColourOperation( LBO_MODULATE );
}
any idea?
thanks.