Code: Select all
//Terrain
ITerrainSceneNode m_terrain = m_manager.AddTerrainSceneNode(pathMedia+"/Maps/Hmap0.jpg",node,-1,new Vector3D(-20000,-1000,-20000),new Vector3D(200,20,200),new Color());
ITexture detail = m_video.GetTexture(pathMedia+"/Maps/Dmap0.jpg");
ITexture terrain = m_video.GetTexture(pathMedia+"/Maps/Dmap0.jpg");
m_terrain.SetMaterialTexture(0,terrain);
m_terrain.SetMaterialTexture(1,detail);
m_terrain.ScaleTexture(45.0f,45.0f);
m_terrain.SetMaterialFlag(MaterialFlag.NORMALIZE_NORMALS,true);
m_terrain.SetMaterialType(MaterialType.DETAIL_MAP);
m_terrain.SetMaterialFlag(MaterialFlag.FOG_ENABLE,true);
//#End Terrain
Why the detail texture is calling as the terrain texture ?