Little fix to get rid of annoying black squares on left and right screen border when moving camera. It fixes some missing(black) parts of hills too ( not all of them but the obvious ones ).

This commit is contained in:
Titus Tscharntke 2011-12-14 22:38:02 +00:00
parent 62c4dfd586
commit 3e7b8a5aa8
1 changed files with 4 additions and 2 deletions

View File

@ -7715,8 +7715,10 @@ VisibleQuadContainerCache & Renderer::getQuadCache( bool updateOnDirtyFrame,
}
else {
SurfaceCell *sc = map->getSurfaceCell(pos);
bool insideQuad = CubeInFrustum(quadCache.frustumData, sc->getVertex().x, sc->getVertex().y, sc->getVertex().z, 1);
//bool insideQuad = PointInFrustum(quadCache.frustumData, sc->getVertex().x, sc->getVertex().y, sc->getVertex().z);
// 2 as last param for CubeInFrustum to get rid of annoying black squares
bool insideQuad = CubeInFrustum(quadCache.frustumData, sc->getVertex().x, sc->getVertex().y, sc->getVertex().z, 2);
if(insideQuad == true) {
quadCache.visibleScaledCellList.push_back(pos);
}