1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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());
}
}