mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-03 23:46:08 +00:00
Dest alpha mask: Try some rules that seem to make sense from what we know now.
This commit is contained in:
parent
7881cf24ec
commit
10b9e83353
@ -339,6 +339,19 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
|
||||
bool gmask = ((gstate.pmskc >> 8) & 0xFF) < 128;
|
||||
bool bmask = ((gstate.pmskc >> 16) & 0xFF) < 128;
|
||||
bool amask = (gstate.pmska & 0xFF) < 128;
|
||||
|
||||
if (gstate.isModeClear()) {
|
||||
// Clear mode? Obey the clear mode alpha mask (works opposite)
|
||||
if (gstate.isClearModeAlphaMask()) {
|
||||
amask = false;
|
||||
}
|
||||
} else {
|
||||
// Let's not write to alpha if stencil isn't enabled.
|
||||
if (!gstate.isStencilTestEnabled()) {
|
||||
amask = false;
|
||||
}
|
||||
}
|
||||
|
||||
glstate.colorMask.set(rmask, gmask, bmask, amask);
|
||||
|
||||
// Stencil Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user