renderer: frustum test new chunks so newly generated chunks render to full view distance #175 (#344)

This commit is contained in:
ModMaker101
2026-03-04 00:37:04 -05:00
committed by GitHub
parent 6c842b2854
commit bfcc4aa10c

View File

@@ -2557,13 +2557,19 @@ void LevelRenderer::cull(Culler *culler, float a)
{
unsigned char flags = pClipChunk->globalIdx == -1 ? 0 : globalChunkFlags[ pClipChunk->globalIdx ];
// Always perform frustum cull test
bool clipres = clip(pClipChunk->aabb, fdraw);
if ( (flags & CHUNK_FLAG_COMPILED ) && ( ( flags & CHUNK_FLAG_EMPTYBOTH ) != CHUNK_FLAG_EMPTYBOTH ) )
{
bool clipres = clip(pClipChunk->aabb, fdraw);
pClipChunk->visible = clipres;
if( pClipChunk->visible ) vis++;
total++;
}
else if (clipres)
{
pClipChunk->visible = true;
}
else
{
pClipChunk->visible = false;
@@ -2572,6 +2578,7 @@ void LevelRenderer::cull(Culler *culler, float a)
}
}
void LevelRenderer::playStreamingMusic(const wstring& name, int x, int y, int z)
{
if (name != L"")