diff options
| author | ModMaker101 <119018978+ModMaker101@users.noreply.github.com> | 2026-03-04 00:37:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-04 12:37:04 +0700 |
| commit | bfcc4aa10c7a56efa275652f6c7b59b5cd5e8f8d (patch) | |
| tree | 17cb6d3155a4b967d68bbc5da21dd91cf79a107a /Minecraft.Client/LevelRenderer.cpp | |
| parent | 6c842b2854fb8c1d0c87ffcbf0bb5c297b883226 (diff) | |
renderer: frustum test new chunks so newly generated chunks render to full view distance #175 (#344)
Diffstat (limited to 'Minecraft.Client/LevelRenderer.cpp')
| -rw-r--r-- | Minecraft.Client/LevelRenderer.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Minecraft.Client/LevelRenderer.cpp b/Minecraft.Client/LevelRenderer.cpp index fc56494f..222a5c18 100644 --- a/Minecraft.Client/LevelRenderer.cpp +++ b/Minecraft.Client/LevelRenderer.cpp @@ -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"") |
