Skip to content

Commit

Permalink
- fixed the burn shader.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jun 9, 2020
1 parent b41ae2d commit af7c2fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/textures/gametexture.cpp
Expand Up @@ -389,7 +389,7 @@ void FGameTexture::SetSpriteRect()

void FGameTexture::CleanHardwareData(bool full)
{
Base->CleanHardwareTextures();
if (full) Base->CleanHardwareTextures();
for (auto mat : Material) if (mat) mat->DeleteDescriptors();
}

Expand Down
5 changes: 5 additions & 0 deletions src/common/textures/hw_material.h
Expand Up @@ -48,6 +48,11 @@ class FMaterial
return sourcetex;
}

void ClearLayers()
{
mTextureLayers.Resize(1);
}

void AddTextureLayer(FTexture *tex, bool allowscale)
{
mTextureLayers.Push({ tex, allowscale });
Expand Down
1 change: 1 addition & 0 deletions src/rendering/2d/f_wipe.cpp
Expand Up @@ -338,6 +338,7 @@ void Wiper_Burn::SetTextures(FGameTexture *startscreen, FGameTexture *endscreen)
endScreen = endscreen;
BurnTexture = new FBurnTexture(WIDTH, HEIGHT);
auto mat = FMaterial::ValidateTexture(endScreen, false);
mat->ClearLayers();
mat->AddTextureLayer(BurnTexture, false);
}

Expand Down

0 comments on commit af7c2fb

Please sign in to comment.