mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add support for color masking. Improves the look of Wipeout greatly.
This commit is contained in:
parent
6c9d28205d
commit
60f9da3926
2 changed files with 10 additions and 2 deletions
|
@ -155,6 +155,14 @@ void ApplyDrawState()
|
|||
glstate.depthFunc.set(ztests[depthTestFunc]);
|
||||
}
|
||||
|
||||
// PSP color/alpha mask is per bit but we can only support per byte.
|
||||
// But let's do that, at least. And let's try a threshold.
|
||||
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;
|
||||
glstate.colorMask.set(rmask, gmask, bmask, amask);
|
||||
|
||||
bool wantDepthWrite = gstate.isModeClear() || gstate.isDepthWriteEnabled();
|
||||
glstate.depthWrite.set(wantDepthWrite ? GL_TRUE : GL_FALSE);
|
||||
|
||||
|
|
|
@ -177,8 +177,8 @@ struct GPUgstate
|
|||
dith4,
|
||||
lop,
|
||||
zmsk,
|
||||
pmsk1,
|
||||
pmsk2,
|
||||
pmskc,
|
||||
pmska,
|
||||
transferstart,
|
||||
transfersrcpos,
|
||||
transferdstpos,
|
||||
|
|
Loading…
Add table
Reference in a new issue