When I create a transparent material and set it to be the material of an Entity, I get mild yellow streaks on the Entity. Hacking with alphaLevel didnt help at all and neither did substituting LBX_MODULATE with LBO_ADD.
Anyone got any ideas?
The code that I am using is below:
Code: Select all
Real alphaLevel = 0.1f; MaterialPtr alphamat = MaterialManager::getSingleton().create("transparentWall", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); Pass* pass = alphamat->getTechnique(0)->getPass(0); pass->setSceneBlending(SBT_TRANSPARENT_ALPHA); pass->setDepthWriteEnabled(false); TextureUnitState* t = pass->createTextureUnitState(); t->setAlphaOperation(LBX_SOURCE1, LBS_MANUAL, LBS_CURRENT, alphaLevel); t->setColourOperationEx(LBX_MODULATE, LBS_TEXTURE, LBS_CURRENT, ColourValue::White, ColourValue::White, alphaLevel);