Page 1 of 1

Lights in ogre

Posted: Thu Sep 08, 2005 12:06 am
by sunbox
Does ogre's lights supports map projection ?

Posted: Thu Sep 08, 2005 10:33 am
by Alexis
You can attach a texture to a frustum and use it as a projection texture.

Code: Select all

MaterialPtr mat_caust = MaterialManager::getSingleton().getByName("Caustic");
    TextureUnitState* tus_caust = mat_caust->getTechnique(0)->getPass(0)->getTextureUnitState(0);
    tus_caust->setProjectiveTexturing(true, m_caustic_frustum); 
Now "Caustic" texture projected by m_caustic_frustum.

Great

Posted: Thu Sep 08, 2005 3:46 pm
by sunbox
Thanks a lot for your fast answer, I use Map projection instead of create many spotlights ( rendertime :s ) ans it's very useful for me ...