I will be fast (because I'm not english ), I have a small program where I load a .3ds file, and I add a light. The render was good, but there are no shadows on the ground, so I have added a shadow volume scene node in my mesh node. This time, the render is very disturbing, the shadows are distorded, they seems to invert themselves, and seems to "follow" the camera...
I give you an example of simplified code :
Code: Select all
irr::IrrlichtDevice *device = irr::createDevice( irr::video::EDT_OPENGL, irr::core::dimension2d<irr::u32>( 768, 512 ), 32, false, true, true, 0 );
irr::video::IVideoDriver *driver = ...
irr::scene::ISceneManager *sceneManager = ...
irr::scene::ICameraSceneNode *camera = ...
irr::scene::IAnimatedMeshSceneNode *myMesh = ...
myMesh->addShadowVolumeSceneNode();
irr::scene::ILightSceneNode *myLight = sceneManager->addLightSceneNode( myMesh, irr::core::vector3df( 4, 5, 1 ), irr::video::SColorf( 1, 0.1, 0.1, 0 ), 100 );
while( device->run()){
driver->beginScene( true, true, irr::video::SColor( 255, 182, 216, 255 ));
sceneManager->drawAll();
driver->endScene();
}
Thanks for any help