mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
Fix occlusion culling, again (#4930)
This commit is contained in:
parent
e4f7ce1985
commit
24edfb77af
@ -301,7 +301,10 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
|
|||||||
float endoff = -BS * MAP_BLOCKSIZE * 1.732050807569;
|
float endoff = -BS * MAP_BLOCKSIZE * 1.732050807569;
|
||||||
v3s16 spn = cam_pos_nodes;
|
v3s16 spn = cam_pos_nodes;
|
||||||
s16 bs2 = MAP_BLOCKSIZE / 2 + 1;
|
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 &&
|
if (occlusion_culling_enabled &&
|
||||||
// For the central point of the mapblock 'endoff' can be halved
|
// For the central point of the mapblock 'endoff' can be halved
|
||||||
isOccluded(this, spn, cpn,
|
isOccluded(this, spn, cpn,
|
||||||
|
Loading…
Reference in New Issue
Block a user