mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-23 18:41:36 +00:00
Flip terrain textures
This commit is contained in:
parent
71401aafe7
commit
fbd4ad9b0c
2 changed files with 3 additions and 3 deletions
|
@ -399,9 +399,9 @@ namespace ESMTerrain
|
||||||
int channel = pack ? std::max(0, (layerIndex-1) % 4) : 0;
|
int channel = pack ? std::max(0, (layerIndex-1) % 4) : 0;
|
||||||
|
|
||||||
if (blendIndex == i)
|
if (blendIndex == i)
|
||||||
pData[y*blendmapSize*channels + x*channels + channel] = 255;
|
pData[(blendmapSize - y - 1)*blendmapSize*channels + x*channels + channel] = 255;
|
||||||
else
|
else
|
||||||
pData[y*blendmapSize*channels + x*channels + channel] = 0;
|
pData[(blendmapSize - y - 1)*blendmapSize*channels + x*channels + channel] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ namespace Terrain
|
||||||
for (unsigned int row = 0; row < mNumVerts; ++row)
|
for (unsigned int row = 0; row < mNumVerts; ++row)
|
||||||
{
|
{
|
||||||
uvs->push_back(osg::Vec2f(col / static_cast<float>(mNumVerts-1),
|
uvs->push_back(osg::Vec2f(col / static_cast<float>(mNumVerts-1),
|
||||||
row / static_cast<float>(mNumVerts-1)));
|
((mNumVerts-1) - row) / static_cast<float>(mNumVerts-1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue