mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-22 07:03:38 +00:00
Merge pull request #16208 from unknownbrackets/gpu-writemask
GPU: Respect stencil state in shader blend
This commit is contained in:
commit
61e7c3e62c
@ -1160,7 +1160,10 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
||||
|
||||
// Note that the mask has already been flipped to the PC way - 1 means write.
|
||||
if (colorWriteMask) {
|
||||
WRITE(p, " v32 = (v32 & u_colorWriteMask) | (d32 & ~u_colorWriteMask);\n");
|
||||
if (stencilToAlpha != REPLACE_ALPHA_NO)
|
||||
WRITE(p, " v32 = (v32 & u_colorWriteMask) | (d32 & ~u_colorWriteMask);\n");
|
||||
else
|
||||
WRITE(p, " v32 = (v32 & u_colorWriteMask & 0x00FFFFFFu) | (d32 & (~u_colorWriteMask | 0xFF000000u));\n");
|
||||
}
|
||||
WRITE(p, " %s = unpackUnorm4x8(v32);\n", compat.fragColor0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user