mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 13:31:37 +00:00
Fix diffuse-only material shaders not applying.
This commit is contained in:
parent
f9de0d5c11
commit
81e7d77b44
1 changed files with 7 additions and 4 deletions
|
@ -133,13 +133,16 @@ FMaterial::FMaterial(FGameTexture * tx, int scaleflags)
|
|||
if (index >= FIRST_USER_SHADER)
|
||||
{
|
||||
const UserShaderDesc& usershader = usershaders[index - FIRST_USER_SHADER];
|
||||
if (tx->Layers && 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
|
||||
{
|
||||
if (tx->Layers)
|
||||
{
|
||||
for (auto& texture : tx->Layers->CustomShaderTextures)
|
||||
{
|
||||
if (texture == nullptr) continue;
|
||||
mTextureLayers.Push({ texture.get(), 0 }); // scalability should be user-definable.
|
||||
}
|
||||
}
|
||||
mShaderIndex = index;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue