@@ -282,6 +282,7 @@ void WieldMeshSceneNode::setExtruded(const std::string &imagename,
282
282
material.TextureLayer [0 ].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
283
283
material.TextureLayer [0 ].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
284
284
material.MaterialType = m_material_type;
285
+ material.MaterialTypeParam = 0 .5f ;
285
286
material.setFlag (video::EMF_BACK_FACE_CULLING, true );
286
287
// Enable bi/trilinear filtering only for high resolution textures
287
288
if (dim.Width > 32 ) {
@@ -426,6 +427,7 @@ void WieldMeshSceneNode::setItem(const ItemStack &item, Client *client, bool che
426
427
for (u32 i = 0 ; i < material_count; ++i) {
427
428
video::SMaterial &material = m_meshnode->getMaterial (i);
428
429
material.MaterialType = m_material_type;
430
+ material.MaterialTypeParam = 0 .5f ;
429
431
material.setFlag (video::EMF_BACK_FACE_CULLING, true );
430
432
material.setFlag (video::EMF_BILINEAR_FILTER, m_bilinear_filter);
431
433
material.setFlag (video::EMF_TRILINEAR_FILTER, m_trilinear_filter);
@@ -569,6 +571,7 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
569
571
scene::IMeshBuffer *buf = mesh->getMeshBuffer (i);
570
572
video::SMaterial &material = buf->getMaterial ();
571
573
material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
574
+ material.MaterialTypeParam = 0 .5f ;
572
575
material.setFlag (video::EMF_BILINEAR_FILTER, false );
573
576
material.setFlag (video::EMF_TRILINEAR_FILTER, false );
574
577
material.setFlag (video::EMF_BACK_FACE_CULLING, true );
@@ -619,6 +622,7 @@ scene::SMesh *getExtrudedMesh(ITextureSource *tsrc,
619
622
material.setFlag (video::EMF_BACK_FACE_CULLING, true );
620
623
material.setFlag (video::EMF_LIGHTING, false );
621
624
material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
625
+ material.MaterialTypeParam = 0 .5f ;
622
626
}
623
627
scaleMesh (mesh, v3f (2.0 , 2.0 , 2.0 ));
624
628
0 commit comments