mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 20:04:31 +01:00
Revert acf4562
This commit is contained in:
1 parent
968be3f54a
commit
5f5220b608
1 file changed
+11
-15
+11
-15
@@ -407,22 +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;
|
||||
|
||||
}
|
||||
glstate.colorMask.set(rmask, gmask, bmask, amask);
|
||||
// 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
|
||||
if (gstate.isStencilTestEnabled() && enableStencilTest) {
|
||||
|
||||
Reference in new issue
Block a user