Merge pull request #4976 from raven02/patch-32

Revert Stencil Change - #4913 - acf4562
This commit is contained in:
Henrik Rydgård committed 2014-01-02 04:42:12 -08:00
commit b58f9e00a5
1 file changed
+10 -13
+10 -13
View File
@@ -407,21 +407,18 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
bool rmask = (gstate.pmskc & 0xFF) < 128;
bool gmask = ((gstate.pmskc >> 8) & 0xFF) < 128;
bool bmask = ((gstate.pmskc >> 16) & 0xFF) < 128;
bool amask = (gstate.pmska & 0xFF) < 128;
bool amask;
ReplaceAlphaType stencilToAlpha = ReplaceAlphaWithStencil();
switch (stencilToAlpha) {
case REPLACE_ALPHA_DUALSOURCE:
case REPLACE_ALPHA_NO:
amask = (gstate.pmska & 0xFF) < 128;
break;
case REPLACE_ALPHA_YES:
amask = true;
break;
// Let's not write to alpha if stencil isn't enabled.
if (!gstate.isStencilTestEnabled()) {
amask = false;
} else {
// If the stencil type is set to KEEP, we shouldn't write to the stencil/alpha channel.
if (ReplaceAlphaWithStencilType() == STENCIL_VALUE_KEEP) {
amask = false;
}
}
glstate.colorMask.set(rmask, gmask, bmask, amask);
// Stencil Test