- fixed stencil marking for SSAO.

This commit is contained in:
Christoph Oelckers 2018-10-30 23:33:45 +01:00
commit aafa445aac
3 changed files with 6 additions and 4 deletions

View file

@ -440,7 +440,8 @@ void FGLRenderState::SetStencil(int offs, int op, int flags)
glStencilOp(GL_KEEP, GL_KEEP, op2gl[op]); // this stage doesn't modify the stencil
bool cmon = !(flags & SF_ColorMaskOff);
glColorMask(cmon, cmon, cmon, cmon); // don't write to the graphics buffer
bool cmalpha = cmon || (flags & SF_ColorMaskAlpha);
glColorMask(cmon, cmon, cmon, cmalpha); // don't write to the graphics buffer
glDepthMask(!(flags & SF_DepthMaskOff));
}