mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Refactor the way you set material properties
Instead of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
This commit is contained in:
@@ -89,13 +89,15 @@ Particle::Particle(
|
||||
}
|
||||
|
||||
// Texture
|
||||
m_material.setFlag(video::EMF_LIGHTING, false);
|
||||
m_material.setFlag(video::EMF_BACK_FACE_CULLING, false);
|
||||
m_material.setFlag(video::EMF_BILINEAR_FILTER, false);
|
||||
m_material.setFlag(video::EMF_FOG_ENABLE, true);
|
||||
m_material.Lighting = false;
|
||||
m_material.BackfaceCulling = false;
|
||||
m_material.FogEnable = true;
|
||||
m_material.forEachTexture([] (video::SMaterialLayer &tex) {
|
||||
tex.BilinearFilter = false;
|
||||
});
|
||||
|
||||
// correctly render layered transparent particles -- see #10398
|
||||
m_material.setFlag(video::EMF_ZWRITE_ENABLE, true);
|
||||
m_material.ZWriteEnable = video::EZW_AUTO;
|
||||
|
||||
// enable alpha blending and set blend mode
|
||||
m_material.MaterialType = video::EMT_ONETEXTURE_BLEND;
|
||||
|
Reference in New Issue
Block a user