summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2011-09-04 05:08:09 +0200
committerPierre Bourdon <delroth@gmail.com>2011-09-04 05:08:09 +0200
commit0bdf8646f09c2f7cf2324ddf6cacf6cc1b31da07 (patch)
tree18ac15a97044197723268dff85e51854d7adb2a1 /Source/Core/VideoCommon/Src/PixelShaderGen.cpp
parentd710eda0c5332293afc44d6fd50b95978c29e60c (diff)
Proof of concept zcomploc implementation
Fixes a few depth related graphics bugs. Example in Baten Kaitos (GKBEAF): Before: http://i.imgur.com/EDdVA.png After: http://i.imgur.com/h6GuY.png Still a few bugs in this implementation: zcomploc switching is not yet implemented, and the color is wrong with this test: http://codepad.org/7GpxklOi (red on Dolphin, gray on Wii).
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderGen.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
index 9146f4cb09..50de52df51 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
@@ -1146,9 +1146,12 @@ static bool WriteAlphaTest(char *&p, API_TYPE ApiType,DSTALPHA_MODE dstAlphaMode
WRITE(p, "ocol1 = 0;\n");
if (DepthTextureEnable)
WRITE(p, "depth = 1.f;\n");
- WRITE(p, "discard;\n");
- if (ApiType != API_D3D11)
- WRITE(p, "return;\n");
+ if (!bpmem.zcontrol.zcomploc)
+ {
+ WRITE(p, "discard;\n");
+ if (ApiType != API_D3D11)
+ WRITE(p, "return;\n");
+ }
WRITE(p, "}\n");
return true;