Improve terrain rendering, handle bug with no detail

This commit is contained in:
Lukas Aldershaab 2021-01-04 20:06:17 +01:00
parent 27641b16ca
commit 481e2a7230
5 changed files with 74 additions and 24 deletions

View file

@ -1370,9 +1370,13 @@ void TerrainHeightMapBlendHLSL::processVert(Vector<ShaderComponent*>& componentL
MultiLine* meta = new MultiLine;
// Make sure the world to tangent transform
// is created and available for the pixel shader.
getOutViewToTangent(componentList, meta, fd);
// Handle an edge-case when there are no detail-maps available
if (fd.features.getNextFeatureIndex(MFT_TerrainDetailMap, -1) >= 0)
{
// Make sure the world to tangent transform
// is created and available for the pixel shader.
getOutViewToTangent(componentList, meta, fd);
}
output = meta;
}