mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Add a setting to group transparency sorted triangles by buffer (#15115)
This commit is contained in:
@@ -73,6 +73,7 @@ static const std::string ClientMap_settings[] = {
|
||||
"trilinear_filter",
|
||||
"bilinear_filter",
|
||||
"anisotropic_filter",
|
||||
"transparency_sorting_group_by_buffers",
|
||||
"transparency_sorting_distance",
|
||||
"occlusion_culler",
|
||||
"enable_raytraced_culling",
|
||||
@@ -115,6 +116,9 @@ void ClientMap::onSettingChanged(std::string_view name, bool all)
|
||||
m_cache_bilinear_filter = g_settings->getBool("bilinear_filter");
|
||||
if (all || name == "anisotropic_filter")
|
||||
m_cache_anistropic_filter = g_settings->getBool("anisotropic_filter");
|
||||
if (all || name == "transparency_sorting_group_by_buffers")
|
||||
m_cache_transparency_sorting_group_by_buffers =
|
||||
g_settings->getBool("transparency_sorting_group_by_buffers");
|
||||
if (all || name == "transparency_sorting_distance")
|
||||
m_cache_transparency_sorting_distance = g_settings->getU16("transparency_sorting_distance");
|
||||
if (all || name == "occlusion_culler")
|
||||
@@ -1337,7 +1341,8 @@ void ClientMap::updateTransparentMeshBuffers()
|
||||
}
|
||||
|
||||
if (do_sort_block) {
|
||||
blockmesh->updateTransparentBuffers(m_camera_position, block->getPos());
|
||||
blockmesh->updateTransparentBuffers(m_camera_position, block->getPos(),
|
||||
m_cache_transparency_sorting_group_by_buffers);
|
||||
++sorted_blocks;
|
||||
} else {
|
||||
blockmesh->consolidateTransparentBuffers();
|
||||
|
Reference in New Issue
Block a user