- fixed: Sprites may never be used as a base of a texture redirect

Due to autoexpansion to remove filtering artifacts their dimensions are not the same as for patches. But if the sprite hadn't been used yet this information won't have been set yet.
This commit is contained in:
Christoph Oelckers 2013-09-20 10:28:12 +02:00
parent fef0782a43
commit 0ff21c3af7

View file

@ -671,12 +671,14 @@ FMaterial::FMaterial(FTexture * tx, bool forceexpand)
tx->gl_info.mExpanded = expanded;
FTexture *basetex = tx->GetRedirect(gl.shadermodel < 4);
if (!expanded && !basetex->gl_info.mExpanded)
if (!expanded && !basetex->gl_info.mExpanded && basetex->UseType != FTexture::TEX_Sprite)
{
// check if the texture is just a simple redirect to a patch
// If so we should use the patch for texture creation to
// avoid eventual redundancies.
// This may only be done if both textures use the same expansion mode
// Redirects to sprites are not permitted because sprites get expanded, however, this won't have been set
// if the sprite hadn't been used yet.
mBaseLayer = ValidateSysTexture(basetex, false);
}
else if (!expanded)