OpenGL Renderer: Fix bug where translucent fragments drawing on top of zero-alpha fragments were not overwriting the destination fragment color as intended. (Regression from commit 2a1aaf7.)

This commit is contained in:
rogerman 2017-10-10 17:43:43 -07:00
parent 47a71941ac
commit 8e94926072
2 changed files with 2 additions and 2 deletions

View File

@ -4290,7 +4290,7 @@ Render3DError OpenGLRenderer_1_2::SetupPolygon(const POLY &thePoly, bool treatAs
{
glStencilFunc(GL_ALWAYS, thePoly.attribute.PolygonID, 0x3F);
glStencilOp(GL_KEEP, GL_KEEP, (treatAsTranslucent) ? GL_KEEP : GL_REPLACE);
glStencilMask(0x7F); // Drawing non-shadow polygons will implicitly reset the shadow volume mask.
glStencilMask(0xFF); // Drawing non-shadow polygons will implicitly reset the shadow volume mask.
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDepthMask((!treatAsTranslucent || thePoly.attribute.TranslucentDepthWrite_Enable) ? GL_TRUE : GL_FALSE);

View File

@ -1914,7 +1914,7 @@ Render3DError OpenGLRenderer_3_2::SetupPolygon(const POLY &thePoly, bool treatAs
{
glStencilFunc(GL_ALWAYS, thePoly.attribute.PolygonID, 0x3F);
glStencilOp(GL_KEEP, GL_KEEP, (treatAsTranslucent) ? GL_KEEP : GL_REPLACE);
glStencilMask(0x7F); // Drawing non-shadow polygons will implicitly reset the shadow volume mask.
glStencilMask(0xFF); // Drawing non-shadow polygons will implicitly reset the shadow volume mask.
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDepthMask((!treatAsTranslucent || thePoly.attribute.TranslucentDepthWrite_Enable) ? GL_TRUE : GL_FALSE);