- fixed: FTexture::SmoothEdges must forward its result to the base texture in case a redirection is in effect.

Both need the bMasked flag, or some code will think that the texture is not fully opaque if no holes were found.

# Conflicts:
#	src/gl/textures/gl_material.h
#	src/textures/texture.cpp
This commit is contained in:
Christoph Oelckers 2018-11-17 18:55:44 +01:00 committed by drfrag666
parent 6c76566bb1
commit ebf46b8d04
2 changed files with 6 additions and 1 deletions

View file

@ -115,7 +115,7 @@ public:
void PrecacheList(SpriteHits &translations);
bool isMasked() const
{
return !!mBaseLayer->tex->bMasked;
return mBaseLayer->tex->bMasked;
}
int GetLayers() const

View file

@ -495,6 +495,11 @@ bool FTexture::ProcessData(unsigned char * buffer, int w, int h, bool ispatch)
if (bMasked)
{
bMasked = SmoothEdges(buffer, w, h);
if (!bMasked)
{
auto stex = GetRedirect(false);
stex->bMasked = false; // also clear in the base texture if there is a redirection.
}
if (bMasked && !ispatch) FindHoles(buffer, w, h);
}
return true;