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:
parent
47a71941ac
commit
8e94926072
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue