- moved the shader properties to FGameTexture.
This commit is contained in:
parent
e60d758287
commit
d812801707
3 changed files with 26 additions and 29 deletions
|
|
@ -109,9 +109,10 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
|
|||
mTextureLayers.Push(placeholder->GetTexture());
|
||||
}
|
||||
|
||||
if (imgtex->shaderindex >= FIRST_USER_SHADER)
|
||||
auto index = tx->GetShaderIndex();
|
||||
if (index >= FIRST_USER_SHADER)
|
||||
{
|
||||
const UserShaderDesc &usershader = usershaders[imgtex->shaderindex - 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
|
||||
{
|
||||
for (auto &texture : tx->CustomShaderTextures)
|
||||
|
|
@ -119,7 +120,7 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
|
|||
if (texture == nullptr) continue;
|
||||
mTextureLayers.Push(texture.get());
|
||||
}
|
||||
mShaderIndex = tx->GetShaderIndex();
|
||||
mShaderIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue