mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-20 14:11:42 +00:00
GPU: Convert alphamask to FF/00 for 5551.
When masking via uniform, we don't care about the lower bits of alpha. Games often use 7F / 80 to control writes of FF/00.
This commit is contained in:
parent
945288f4b5
commit
98758573e3
@ -1070,6 +1070,15 @@ static void ConvertMaskState(GenericMaskState &maskState, bool shaderBitOpsSuppo
|
||||
maskState.channelMask &= ~8;
|
||||
maskState.uniformMask &= ~0xFF000000;
|
||||
}
|
||||
|
||||
// For 5551, only the top alpha bit matters. We might even want to swizzle 4444.
|
||||
// Alpha should correctly read as 255 from a 5551 texture.
|
||||
if (gstate.FrameBufFormat() == GE_FORMAT_5551) {
|
||||
if ((maskState.uniformMask & 0x80000000) != 0)
|
||||
maskState.uniformMask |= 0xFF000000;
|
||||
else
|
||||
maskState.uniformMask &= ~0xFF000000;
|
||||
}
|
||||
}
|
||||
|
||||
// Called even if AlphaBlendEnable == false - it also deals with stencil-related blend state.
|
||||
|
Loading…
x
Reference in New Issue
Block a user