mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Client map: do frustum culling via planes (#12710)
This commit is contained in:
parent
a428a0cf37
commit
c9ed059d91
8 changed files with 113 additions and 42 deletions
|
@ -100,7 +100,7 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* Implements a binary space partitioning tree
|
||||
* Implements a binary space partitioning tree
|
||||
* See also: https://en.wikipedia.org/wiki/Binary_space_partitioning
|
||||
*/
|
||||
class MapBlockBspTree
|
||||
|
@ -221,6 +221,12 @@ public:
|
|||
m_animation_force_timer--;
|
||||
}
|
||||
|
||||
/// Radius of the bounding-sphere, in BS-space.
|
||||
f32 getBoundingRadius() const { return m_bounding_radius; }
|
||||
|
||||
/// Center of the bounding-sphere, in BS-space, relative to block pos.
|
||||
v3f getBoundingSphereCenter() const { return m_bounding_sphere_center; }
|
||||
|
||||
/// update transparent buffers to render towards the camera
|
||||
void updateTransparentBuffers(v3f camera_pos, v3s16 block_pos);
|
||||
void consolidateTransparentBuffers();
|
||||
|
@ -243,6 +249,10 @@ private:
|
|||
ITextureSource *m_tsrc;
|
||||
IShaderSource *m_shdrsrc;
|
||||
|
||||
f32 m_bounding_radius;
|
||||
// MapblockMeshGenerator uses the same as mapblock center
|
||||
v3f m_bounding_sphere_center = v3f((MAP_BLOCKSIZE * 0.5f - 0.5f) * BS);
|
||||
|
||||
bool m_enable_shaders;
|
||||
bool m_enable_vbo;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue