mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-20 01:00:24 +01:00
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->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
cacheHandler->setAlphaTest(true);
|
||||
cacheHandler->setAlphaFunc(GL_GREATER, 0.f);
|
||||
}
|
||||
else if (FixedBlending)
|
||||
{
|
||||
@ -291,7 +293,7 @@ void COpenGLSLMaterialRenderer::OnUnsetMaterial()
|
||||
{
|
||||
cacheHandler->setBlend(false);
|
||||
}
|
||||
else if (AlphaTest)
|
||||
if (Alpha || AlphaTest)
|
||||
{
|
||||
cacheHandler->setAlphaTest(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user