1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Add a setting to group transparency sorted triangles by buffer (#15115)

This commit is contained in:
DS 2024-11-28 14:22:53 +01:00 committed by GitHub
parent c175046d30
commit df4e70b2c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 66 additions and 14 deletions

View file

@ -209,8 +209,14 @@ public:
/// 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);
/** Update transparent buffers to render towards the camera.
* @param group_by_buffers If true, triangles in the same buffer are batched
* into the same PartialMeshBuffer, resulting in fewer draw calls, but
* wrong order. Triangles within a single buffer are still ordered, and
* buffers are ordered relative to each other (with respect to their nearest
* triangle).
*/
void updateTransparentBuffers(v3f camera_pos, v3s16 block_pos, bool group_by_buffers);
void consolidateTransparentBuffers();
/// get the list of transparent buffers