Fix items glowing with shaders enabled

This commit is contained in:
Lars Mueller 2024-06-02 17:41:49 +02:00
parent 7f1105cd47
commit 8b11c73994

@ -486,6 +486,13 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, Client *client, bool che
const auto material_type = def.type == ITEM_NODE
? f.getMaterialType() : TILE_MATERIAL_ALPHA;
MaterialType_to_irr(material_type, m_material_type, m_material_type_param);
if (m_enable_shaders) {
IShaderSource *shdrsrc = client->getShaderSource();
u32 shader_id = shdrsrc->getShader("object_shader",
material_type, def.type == ITEM_NODE ? f.drawtype : NDT_MESH);
// Note: The shader may give us a different material back.
m_material_type = shdrsrc->getShaderInfo(shader_id).material;
}
// Color-related
m_colors.clear();