- 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.
This commit is contained in:
Christoph Oelckers 2020-06-03 00:16:25 +02:00
parent 932b2d820d
commit fa54afbd08
2 changed files with 2 additions and 1 deletions

View File

@ -114,7 +114,7 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
if (index >= FIRST_USER_SHADER) if (index >= FIRST_USER_SHADER)
{ {
const UserShaderDesc &usershader = usershaders[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) for (auto &texture : tx->CustomShaderTextures)
{ {

View File

@ -1401,6 +1401,7 @@ class GLDefsParser
!usershaders[i].defines.Compare(usershader.defines)) !usershaders[i].defines.Compare(usershader.defines))
{ {
SetShaderIndex(tex, i + FIRST_USER_SHADER); SetShaderIndex(tex, i + FIRST_USER_SHADER);
tex->SetShaderLayers(mlay);
return; return;
} }
} }