Here is my code for loading terrain.
terrain = smgr->addTerrainSceneNode"../../media/terrain/heightmap.bmp");
float TERR_SIZE = 280;
terrain->setScale(core::vector3df(TERR_SIZE, 25.0f,TERR_SIZE));
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
terrain->setPosition(vector3df(-TERR_SIZE*256/2,-700,-TERR_SIZE*256/2));
addTerrain(terrain,nWorld,terrain->getScale().X,terrain->getScale().Y,0,terrain->getPosition());
terrain->setMaterialType((video::E_MATERIAL_TYPE)matTerrain);
terrain->setMaterialFlag(video::EMF_LIGHTING, false);
terrain->setMaterialFlag(EMF_POINTCLOUD, false);
terrain->setMaterialFlag(video::EMF_BILINEAR_FILTER, true);
terrain->setMaterialTexture(0, driver->getTexture("../../media/TERRAIN/alphamap.bmp"));
terrain->setMaterialTexture(1, driver->getTexture("../../media/TERRAIN/s5.bmp"));
terrain->setMaterialTexture(2, driver->getTexture("../../media/TERRAIN/s18.bmp"));
terrain->setMaterialTexture(3, driver->getTexture("../../media/TERRAIN/s17.bmp"));
Result is here:
Why the hell filtering doesn't work as it should????
Don't forget I'm using register(s0)... stuff in shader because of 4 texture support.