1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Release shadow mapping resources when not needed (#12497)

This commit is contained in:
x2048
2022-07-09 22:26:39 +02:00
committed by GitHub
parent b15393c2a5
commit 7c261118e0
5 changed files with 47 additions and 33 deletions

View File

@@ -556,10 +556,6 @@ void WieldMeshSceneNode::changeToMesh(scene::IMesh *mesh)
if (m_shadow) {
// Add mesh to shadow caster
m_shadow->addNodeToShadowList(m_meshnode);
// Set shadow texture
for (u32 i = 0; i < m_meshnode->getMaterialCount(); i++)
m_meshnode->setMaterialTexture(3, m_shadow->get_texture());
}
}