I am setting my object to be transparent but found that it is affected by the lighting direction,
for some direction the object is transparent well, for some other direction the object is just not transparent as expected.
I tried to avoid the affection of the lighting, but there is no option since all the emissive, ambient, diffuse, specular colours option that i could deal with are all affected by lightings.
I would like it to glow at a specific colour with some transparency and without affecting of the light object.
How could i achieve this?
below is the code that i used currently to generate an object with glow effect with transparency (but affected by light object)
Code: Select all
Ogre::MaterialPtr lpMaterial = Ogre::MaterialManager::getSingletonPtr()->getByName(objName);
Ogre::Technique * lpTechnique = lpMaterial->getTechnique(0);
Ogre::Pass * lpPass = lpTechnique->getPass(0);
lpPass->setAmbient(Ogre::ColourValue(red, green, blue, alpha));
lpPass->setCullingMode(Ogre::CULL_NONE);
lpPass->setDepthWriteEnabled(false);
lpPass->setSceneBlending(Ogre::SBF_SOURCE_ALPHA, Ogre::SBF_ONE_MINUS_SOURCE_ALPHA);