diff --git a/GPU/Common/GPUStateUtils.cpp b/GPU/Common/GPUStateUtils.cpp index e26498ae91..f16f69cd7e 100644 --- a/GPU/Common/GPUStateUtils.cpp +++ b/GPU/Common/GPUStateUtils.cpp @@ -1171,7 +1171,13 @@ void ConvertBlendState(GenericBlendState &blendState, bool allowShaderBlend) { break; } } else if (!IsStencilTestOutputDisabled()) { - switch (ReplaceAlphaWithStencilType()) { + StencilValueType stencilValue = ReplaceAlphaWithStencilType(); + if (stencilValue == STENCIL_VALUE_UNIFORM && constantAlpha == 0x00) { + stencilValue = STENCIL_VALUE_ZERO; + } else if (stencilValue == STENCIL_VALUE_UNIFORM && constantAlpha == 0xFF) { + stencilValue = STENCIL_VALUE_ONE; + } + switch (stencilValue) { case STENCIL_VALUE_KEEP: blendState.setFactors(glBlendFuncA, glBlendFuncB, BlendFactor::ZERO, BlendFactor::ONE); break;