mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix texture alpha when texturing from full-alpha textures.
Fixes #16875
This commit is contained in:
parent
5045d033ec
commit
c11f7e3a5f
2 changed files with 6 additions and 2 deletions
|
@ -199,7 +199,11 @@ void BaseUpdateUniforms(UB_VS_FS_Base *ub, uint64_t dirtyUniforms, bool flipView
|
|||
}
|
||||
|
||||
if (dirtyUniforms & DIRTY_TEX_ALPHA_MUL) {
|
||||
ub->texNoAlpha = gstate.isTextureAlphaUsed() ? 0.0f : 1.0f;
|
||||
bool doTextureAlpha = gstate.isTextureAlphaUsed();
|
||||
if (gstate_c.textureFullAlpha && gstate.getTextureFunction() != GE_TEXFUNC_REPLACE) {
|
||||
doTextureAlpha = false;
|
||||
}
|
||||
ub->texNoAlpha = doTextureAlpha ? 0.0f : 1.0f;
|
||||
ub->texMul = gstate.isColorDoublingEnabled() ? 2.0f : 1.0f;
|
||||
}
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ struct GPUStateCache {
|
|||
void SetTextureFullAlpha(bool fullAlpha) {
|
||||
if (fullAlpha != textureFullAlpha) {
|
||||
textureFullAlpha = fullAlpha;
|
||||
Dirty(DIRTY_FRAGMENTSHADER_STATE);
|
||||
Dirty(DIRTY_FRAGMENTSHADER_STATE | DIRTY_TEX_ALPHA_MUL);
|
||||
}
|
||||
}
|
||||
void SetNeedShaderTexclamp(bool need) {
|
||||
|
|
Loading…
Add table
Reference in a new issue