Relevant code is:
Code: Select all
smgr->getMeshManipulator()->setVertexColors(smgr->getMesh("bird.irrmesh"), SColor(0, 0, 0, 0));
auto shadowNode = smgr->addAnimatedMeshSceneNode(smgr->getMesh("bird.irrmesh"), impl->node);
shadowNode->setID(0);
shadowNode->setMaterialFlag(irr::video::EMF_LIGHTING, false);
shadowNode->setMaterialFlag(irr::video::EMF_ZWRITE_ENABLE, false);
shadowNode->setMaterialFlag(irr::video::EMF_BACK_FACE_CULLING, false);
shadowNode->setMaterialType(irr::video::EMT_TRANSPARENT_VERTEX_ALPHA);
shadowNode->addShadowVolumeSceneNode()->setID(0);
smgr->setShadowColor(SColor(150,0,0,0));
Workaround is to use a copy of bird.irrmesh that's scaled by 0.99f:
Code: Select all
auto smesh = smgr->getMeshManipulator()->createMeshCopy(smgr->getMesh("bird.irrmesh")->getMesh(0));
smgr->getMeshManipulator()->scale(smesh, vector3df(.99f, .99f, .99f));
smgr->getMeshManipulator()->setVertexColors(smesh, SColor(0, 0, 0, 0));
auto mesh = smgr->getMeshManipulator()->createAnimatedMesh(smesh);
smesh->drop();
auto shadowNode = smgr->addAnimatedMeshSceneNode(mesh, impl->node);
mesh->drop();