Disable color writing when alpha test always fails.

This commit is contained in:
NeoBrainX
2013-01-08 17:23:01 +01:00
parent d26bcb0847
commit be706a3977
4 changed files with 21 additions and 13 deletions

View File

@ -712,7 +712,6 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
if(RegisterStates[0].AlphaNeedOverflowControl || RegisterStates[0].ColorNeedOverflowControl)
WRITE(p, "prev = frac(prev * (255.0f/256.0f)) * (256.0f/255.0f);\n");
// TODO: ALPHATEST_FAIL should be handled by disabling color writes in the render state
AlphaTest::TEST_RESULT Pretest = bpmem.alpha_test.TestResult();
if (Pretest == AlphaTest::UNDETERMINED)
WriteAlphaTest(p, ApiType, dstAlphaMode);