From fa54afbd085cd207a1cdec3397b651de00259953 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 3 Jun 2020 00:16:25 +0200 Subject: [PATCH] - addressed a problem with materials depending on automatically added textures. This isn't a fix, it just removes a sanity check that really shouldn't be, but thanks of an underspecification of the material definition it was never possible to do this case properly. --- src/common/textures/hw_material.cpp | 2 +- src/r_data/gldefs.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/textures/hw_material.cpp b/src/common/textures/hw_material.cpp index c4a1ba9d3..af4bc2c60 100644 --- a/src/common/textures/hw_material.cpp +++ b/src/common/textures/hw_material.cpp @@ -114,7 +114,7 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags) if (index >= FIRST_USER_SHADER) { const UserShaderDesc &usershader = usershaders[index - FIRST_USER_SHADER]; - if (usershader.shaderType == mShaderIndex) // Only apply user shader if it matches the expected material + //if (usershader.shaderType == mShaderIndex) // Only apply user shader if it matches the expected material { for (auto &texture : tx->CustomShaderTextures) { diff --git a/src/r_data/gldefs.cpp b/src/r_data/gldefs.cpp index f59000619..b561000c4 100644 --- a/src/r_data/gldefs.cpp +++ b/src/r_data/gldefs.cpp @@ -1401,6 +1401,7 @@ class GLDefsParser !usershaders[i].defines.Compare(usershader.defines)) { SetShaderIndex(tex, i + FIRST_USER_SHADER); + tex->SetShaderLayers(mlay); return; } }