mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- 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:
parent
fef0782a43
commit
0ff21c3af7
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue