forked from mirror/openmw-tes3mp
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;
|
||||
|
||||
if (blendIndex == i)
|
||||
pData[y*blendmapSize*channels + x*channels + channel] = 255;
|
||||
pData[(blendmapSize - y - 1)*blendmapSize*channels + x*channels + channel] = 255;
|
||||
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)
|
||||
{
|
||||
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