Code: Select all
Ogre::Light *light = sceneManager->createLight();
Ogre::SceneNode *lightNode = rootNode->createChildSceneNode();
lightNode->attachObject( light );
light->setPowerScale(Ogre::Math::PI);
light->setType( Ogre::Light::LT_POINT );
light->setAttenuationBasedOnRadius(10.0f, 0.01f);
mLightNodes[0] = lightNode;
light = sceneManager->createLight();
lightNode = rootNode->createChildSceneNode();
lightNode->attachObject( light );
light->setDiffuseColour( 0.8f, 0.4f, 0.2f ); //Warm
light->setSpecularColour( 0.8f, 0.4f, 0.2f );
light->setPowerScale( Ogre::Math::PI );
light->setType( Ogre::Light::LT_POINT);
lightNode->setPosition( -10.0f, 10.0f, 10.0f );
light->setAttenuationBasedOnRadius( 10.0f, 0.01f );
mLightNodes[1] = lightNode;
light = sceneManager->createLight();
lightNode = rootNode->createChildSceneNode();
lightNode->attachObject( light );
light->setDiffuseColour( 0.2f, 0.4f, 0.8f ); //Cold
light->setSpecularColour( 0.2f, 0.4f, 0.8f );
light->setPowerScale( Ogre::Math::PI );
light->setType( Ogre::Light::LT_POINT);
lightNode->setPosition( 10.0f, 10.0f, -10.0f );
light->setAttenuationBasedOnRadius( 10.0f, 0.01f );
mLightNodes[2] = lightNode;
Question is, how can I make OGRE display more than two point lights at once? Do I have to do something with compositor, turn on Forward3D or is it some kind of bug? Also, I don't really need multiple shadows, just one would be perfect.