Better fix for missing transparency in GLES legacy pipeline

This commit is contained in:
Deve 2017-03-08 23:17:03 +01:00
parent 21cb853079
commit adfa8f30f9
2 changed files with 6 additions and 9 deletions

View File

@ -37,7 +37,7 @@ vec4 renderSolid()
if(uTextureUsage0)
Color *= texture2D(uTextureUnit0, varTexCoord0);
Color.a = 1.0;
//Color.a = 1.0;
return Color;
}

View File

@ -67,15 +67,12 @@ void COGLES2FixedPipelineRenderer::OnSetMaterial(const video::SMaterial& materia
}
else if (Blending)
{
//E_BLEND_FACTOR srcFact,dstFact;
//E_MODULATE_FUNC modulate;
//u32 alphaSource;
//unpack_textureBlendFunc(srcFact, dstFact, modulate, alphaSource, material.MaterialTypeParam);
E_BLEND_FACTOR srcFact,dstFact;
E_MODULATE_FUNC modulate;
u32 alphaSource;
unpack_textureBlendFunc(srcFact, dstFact, modulate, alphaSource, material.MaterialTypeParam);
//Driver->getBridgeCalls()->setBlendFunc(Driver->getGLBlend(srcFact), Driver->getGLBlend(dstFact));
//Driver->getBridgeCalls()->setBlend(true);
Driver->getBridgeCalls()->setBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
Driver->getBridgeCalls()->setBlendFunc(Driver->getGLBlend(srcFact), Driver->getGLBlend(dstFact));
Driver->getBridgeCalls()->setBlend(true);
}
else