Apply workaround to fix #1869
This commit is contained in:
@@ -510,6 +510,14 @@ void ParticleEmitter::setParticleType(const ParticleKind* type)
|
||||
m_node->setMaterialTexture(0, material->getTexture());
|
||||
|
||||
mat0.ZWriteEnable = !material->isTransparent(); // disable z-buffer writes if material is transparent
|
||||
|
||||
// fallback for old render engine
|
||||
if (material->getShaderType() == Material::SHADERTYPE_ADDITIVE)
|
||||
mat0.MaterialType = video::EMT_TRANSPARENT_ADD_COLOR;
|
||||
else if (material->getShaderType() == Material::SHADERTYPE_ALPHA_BLEND)
|
||||
mat0.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||
else if (material->getShaderType() == Material::SHADERTYPE_ALPHA_TEST)
|
||||
mat0.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user