From 44beebf6b0a2d5325dd9be12c8478c7ec2002141 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 3 Dec 2013 00:51:25 +0100 Subject: [PATCH] Realized it's ok to combine the stencil-to-alpha with alpha testing as it's done within the shader, before we replace alpha. --- GPU/GLES/FragmentShaderGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/FragmentShaderGenerator.cpp b/GPU/GLES/FragmentShaderGenerator.cpp index b5d955da21..d38d9c1207 100644 --- a/GPU/GLES/FragmentShaderGenerator.cpp +++ b/GPU/GLES/FragmentShaderGenerator.cpp @@ -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;