mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix texture alpha when texturing from full-alpha textures.
Fixes #16875
This commit is contained in:
parent
5045d033ec
commit
c11f7e3a5f
@ -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…
Reference in New Issue
Block a user