1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Use vertices with tangents only when its needed.

This commit is contained in:
RealBadAngel 2016-02-12 12:25:20 +01:00 committed by paramat
parent 3a74b84007
commit 7ea40e45b1
4 changed files with 131 additions and 67 deletions

View file

@ -263,6 +263,9 @@ Client::Client(
m_cache_smooth_lighting = g_settings->getBool("smooth_lighting");
m_cache_enable_shaders = g_settings->getBool("enable_shaders");
m_cache_use_tangent_vertices = m_cache_enable_shaders && (
g_settings->getBool("enable_bumpmapping") ||
g_settings->getBool("enable_parallax_occlusion"));
}
void Client::Stop()
@ -1582,7 +1585,8 @@ void Client::addUpdateMeshTask(v3s16 p, bool ack_to_server, bool urgent)
Create a task to update the mesh of the block
*/
MeshMakeData *data = new MeshMakeData(this, m_cache_enable_shaders);
MeshMakeData *data = new MeshMakeData(this, m_cache_enable_shaders,
m_cache_use_tangent_vertices);
{
//TimeTaker timer("data fill");