forked from mirror/openmw-tes3mp
Now doesn't attempt to use fake vertex colours with cells that don't have vertex colours
This commit is contained in:
parent
6924348696
commit
611f336d07
1 changed files with 12 additions and 8 deletions
|
@ -300,15 +300,18 @@ namespace MWRender
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the vertex colour overlay
|
//add the vertex colour overlay
|
||||||
//TODO sort the *4 bit
|
if ( store->land[1][1]->landData->usingColours )
|
||||||
Ogre::TexturePtr vclr = getVertexColours(store, vertexColourAlpha, fromX*4, fromY*4, mLandSize);
|
{
|
||||||
Ogre::TexturePtr normDisp = getNormalDisp("DOES_NOT_EXIST");
|
//TODO sort the *4 bit
|
||||||
|
Ogre::TexturePtr vclr = getVertexColours(store, vertexColourAlpha, fromX*4, fromY*4, mLandSize);
|
||||||
|
Ogre::TexturePtr normDisp = getNormalDisp("DOES_NOT_EXIST");
|
||||||
|
|
||||||
const size_t position = terrainData->layerList.size();
|
const size_t position = terrainData->layerList.size();
|
||||||
terrainData->layerList.push_back(Ogre::Terrain::LayerInstance());
|
terrainData->layerList.push_back(Ogre::Terrain::LayerInstance());
|
||||||
terrainData->layerList[position].worldSize = mRealSize;
|
terrainData->layerList[position].worldSize = mRealSize;
|
||||||
terrainData->layerList[position].textureNames.push_back(vclr->getName());
|
terrainData->layerList[position].textureNames.push_back(vclr->getName());
|
||||||
terrainData->layerList[position].textureNames.push_back(normDisp->getName());
|
terrainData->layerList[position].textureNames.push_back(normDisp->getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------
|
||||||
|
@ -343,6 +346,7 @@ namespace MWRender
|
||||||
memset(pBlend, 0, sizeof(float) * blendSize * blendSize);
|
memset(pBlend, 0, sizeof(float) * blendSize * blendSize);
|
||||||
}
|
}
|
||||||
//except the overlay, which we will just splat over the top
|
//except the overlay, which we will just splat over the top
|
||||||
|
if ( store->land[1][1]->landData->usingColours )
|
||||||
{
|
{
|
||||||
//the overlay is always the last texture layer
|
//the overlay is always the last texture layer
|
||||||
float* pBlend = terrain->getLayerBlendMap(terrain->getLayerCount() - 1)
|
float* pBlend = terrain->getLayerBlendMap(terrain->getLayerCount() - 1)
|
||||||
|
|
Loading…
Reference in a new issue