- fixed the burn shader.

This commit is contained in:
Christoph Oelckers 2020-06-09 22:06:19 +02:00
parent b41ae2dfdd
commit af7c2fb4e9
3 changed files with 7 additions and 1 deletions

View file

@ -389,7 +389,7 @@ void FGameTexture::SetSpriteRect()
void FGameTexture::CleanHardwareData(bool full) void FGameTexture::CleanHardwareData(bool full)
{ {
Base->CleanHardwareTextures(); if (full) Base->CleanHardwareTextures();
for (auto mat : Material) if (mat) mat->DeleteDescriptors(); for (auto mat : Material) if (mat) mat->DeleteDescriptors();
} }

View file

@ -48,6 +48,11 @@ public:
return sourcetex; return sourcetex;
} }
void ClearLayers()
{
mTextureLayers.Resize(1);
}
void AddTextureLayer(FTexture *tex, bool allowscale) void AddTextureLayer(FTexture *tex, bool allowscale)
{ {
mTextureLayers.Push({ tex, allowscale }); mTextureLayers.Push({ tex, allowscale });

View file

@ -338,6 +338,7 @@ void Wiper_Burn::SetTextures(FGameTexture *startscreen, FGameTexture *endscreen)
endScreen = endscreen; endScreen = endscreen;
BurnTexture = new FBurnTexture(WIDTH, HEIGHT); BurnTexture = new FBurnTexture(WIDTH, HEIGHT);
auto mat = FMaterial::ValidateTexture(endScreen, false); auto mat = FMaterial::ValidateTexture(endScreen, false);
mat->ClearLayers();
mat->AddTextureLayer(BurnTexture, false); mat->AddTextureLayer(BurnTexture, false);
} }