mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Unify the spongebob depth inverse check
This commit is contained in:
1 parent
322f29ce80
commit
df92f72ac3
5 files changed
+15
-18
No files matched your search
@@ -305,10 +305,7 @@ void DrawEngineVulkan::ConvertStateToVulkanKey(FramebufferManagerVulkan &fbManag
|
||||
// Nasty special case for Spongebob and similar where it tries to write zeros to alpha/stencil during
|
||||
// depth-fail. We can't write to alpha then because the pixel is killed. However, we can invert the depth
|
||||
// test and modify the alpha function...
|
||||
if (gstate.isDepthTestEnabled() && !gstate.isDepthWriteEnabled() && stencilState.zFail == GE_STENCILOP_ZERO &&
|
||||
stencilState.sFail == GE_STENCILOP_KEEP && stencilState.zPass == GE_STENCILOP_KEEP &&
|
||||
stencilState.testFunc == GE_COMP_ALWAYS &&
|
||||
stencilState.writeMask == 0xFF && stencilState.testMask == 0xFF && stencilState.testRef == 0xFF) {
|
||||
if (SpongebobDepthInverseConditions(stencilState)) {
|
||||
key.blendEnable = true;
|
||||
key.blendOpAlpha = VK_BLEND_OP_ADD;
|
||||
key.blendOpColor = VK_BLEND_OP_ADD;
|
||||
|
||||
Reference in new issue
Block a user