- major shader rework

* handle brightmaps in the main shader instead of keeping separate instances around.
* added detail and glow layers from Raze.
* fixed material setup which could not guarantee that everything was initialized correctly.
* for warped textures, warp all layers. With this brightmaps finally work on warped textures.

Note: Vulkan reports a "device lost" error with this which still needs to be investigated.
This commit is contained in:
Christoph Oelckers 2020-04-12 22:10:15 +02:00
commit 8381092cce
31 changed files with 293 additions and 134 deletions

View file

@ -116,7 +116,7 @@ FTexture::FTexture (const char *name, int lumpnum)
:
Scale(1,1), SourceLump(lumpnum),
UseType(ETextureType::Any), bNoDecals(false), bNoRemap0(false), bWorldPanning(false),
bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(0), bComplex(false), bMultiPatch(false), bFullNameTexture(false),
bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(1), bComplex(false), bMultiPatch(false), bFullNameTexture(false),
Rotations(0xFFFF), SkyOffset(0), Width(0), Height(0)
{
bBrightmapChecked = false;
@ -384,7 +384,7 @@ void FTexture::CreateDefaultBrightmap()
// Check for brightmaps
if (GetImage() && GetImage()->UseGamePalette() && GPalette.HasGlobalBrightmap &&
UseType != ETextureType::Decal && UseType != ETextureType::MiscPatch && UseType != ETextureType::FontChar &&
Brightmap == NULL && bWarped == 0)
Brightmap == NULL)
{
// May have one - let's check when we use this texture
auto texbuf = Get8BitPixels(false);