mirror of
https://github.com/minetest/irrlicht.git
synced 2025-03-06 20:49:24 +01:00
Enable GL_ALPHA_TEST in OpenGL driver for custom transparent alpha shaders
This commit is contained in:
parent
24594ce226
commit
401e769114
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue