forked from Mirrorlandia_minetest/irrlicht
Enable GL_ALPHA_TEST in OpenGL driver for custom transparent alpha shaders
This commit is contained in:
parent
24594ce226
commit
401e769114
@ -243,6 +243,8 @@ void COpenGLSLMaterialRenderer::OnSetMaterial(const video::SMaterial& material,
|
|||||||
{
|
{
|
||||||
cacheHandler->setBlend(true);
|
cacheHandler->setBlend(true);
|
||||||
cacheHandler->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
cacheHandler->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
cacheHandler->setAlphaTest(true);
|
||||||
|
cacheHandler->setAlphaFunc(GL_GREATER, 0.f);
|
||||||
}
|
}
|
||||||
else if (FixedBlending)
|
else if (FixedBlending)
|
||||||
{
|
{
|
||||||
@ -291,7 +293,7 @@ void COpenGLSLMaterialRenderer::OnUnsetMaterial()
|
|||||||
{
|
{
|
||||||
cacheHandler->setBlend(false);
|
cacheHandler->setBlend(false);
|
||||||
}
|
}
|
||||||
else if (AlphaTest)
|
if (Alpha || AlphaTest)
|
||||||
{
|
{
|
||||||
cacheHandler->setAlphaTest(false);
|
cacheHandler->setAlphaTest(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user