mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 08:00:56 -04:00
Flip terrain textures
This commit is contained in:
parent
71401aafe7
commit
fbd4ad9b0c
@ -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…
x
Reference in New Issue
Block a user