Skip to content

Commit

Permalink
Fix occlusion culling, again (#4930)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhofhansl authored and est31 committed Dec 19, 2016
1 parent e4f7ce1 commit 24edfb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/clientmap.cpp
Expand Up @@ -301,7 +301,10 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
float endoff = -BS * MAP_BLOCKSIZE * 1.732050807569;
v3s16 spn = cam_pos_nodes;
s16 bs2 = MAP_BLOCKSIZE / 2 + 1;
u32 needed_count = 1;
// to reduce the likelihood of falsely occluded blocks
// require at least two solid blocks
// this is a HACK, we should think of a more precise algorithm
u32 needed_count = 2;
if (occlusion_culling_enabled &&
// For the central point of the mapblock 'endoff' can be halved
isOccluded(this, spn, cpn,
Expand Down

0 comments on commit 24edfb7

Please sign in to comment.