This is with no mapping
I think this is a texture rotation bug (a thing you can't see on a wall or on a sphere for example)
These two screenshots were made in DirectX 9 mode but it is the same in other modes
Here is my code if you want to be sure :
textn is the texture filename
texthn is the mapping texture filename
meshn is the model filename
Code: Select all
irr::scene::IAnimatedMesh* mesh;
irr::scene::ISceneNode* node;
#ifndef _NO_MAPPING
irr::video::ITexture* normalMap = device->getVideoDriver()->getTexture(texthn);
device->getVideoDriver()->makeNormalMapTexture(normalMap, 20.0f);
mesh = device->getSceneManager()->getMesh(meshn);
device->getSceneManager()->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.003f);
node = device->getSceneManager()->addMeshSceneNode(device->getSceneManager()->getMeshManipulator()->createMeshWithTangents(mesh->getMesh(0)));
node->setMaterialTexture(0, device->getVideoDriver()->getTexture(textn));
node->setMaterialTexture(1, normalMap);
node->getMaterial(0).EmissiveColor.set(0, 0, 0, 0);
node->setMaterialType(irr::video::EMT_NORMAL_MAP_SOLID);
#else
mesh = device->getSceneManager()->getMesh(meshn);
node = device->getSceneManager()->addMeshSceneNode(mesh->getMesh(0));
node->setMaterialTexture(0, device->getVideoDriver()->getTexture(textn));
#endif
node->setMaterialFlag(irr::video::EMF_FOG_ENABLE, true);
node->setPosition(irr::core::vector3df(0, 0, 0));
node->setRotation(irr::core::vector3df(0, 0, 0));
#define _NO_MAPPING