mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #11964 from unknownbrackets/gpu-stencil-blend
GPU: Improve non dual source stencil replace
This commit is contained in:
commit
b56c66e889
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue