Realized it's ok to combine the stencil-to-alpha with alpha testing as it's done within the shader, before we replace alpha.

This commit is contained in:
Henrik Rydgard committed 2013-12-03 00:51:25 +01:00
1 parent 39b632b279
commit 44beebf6b0
1 file changed
+2 -2
+2 -2
View File
@@ -163,7 +163,7 @@ void ComputeFragmentShaderID(FragmentShaderID *id) {
bool doTextureAlpha = gstate.isTextureAlphaUsed();
bool stencilToAlpha =
gstate.isStencilTestEnabled() && gstate.getStencilOpZPass() == GE_STENCILOP_REPLACE &&
!gstate.isAlphaBlendEnabled() && !enableAlphaTest;
!gstate.isAlphaBlendEnabled();
// All texfuncs except replace are the same for RGB as for RGBA with full alpha.
if (gstate_c.textureFullAlpha && gstate.getTextureFunction() != GE_TEXFUNC_REPLACE)
@@ -232,7 +232,7 @@ void GenerateFragmentShader(char *buffer) {
bool doTextureAlpha = gstate.isTextureAlphaUsed();
bool stencilToAlpha =
gstate.isStencilTestEnabled() && gstate.getStencilOpZPass() == GE_STENCILOP_REPLACE &&
!gstate.isAlphaBlendEnabled() && !enableAlphaTest;
!gstate.isAlphaBlendEnabled();
if (gstate_c.textureFullAlpha && gstate.getTextureFunction() != GE_TEXFUNC_REPLACE)
doTextureAlpha = false;