implement per-class globalshaders

This commit is contained in:
Ricardo Luís Vaz Silva 2025-01-10 19:52:58 -03:00 committed by Magnus Norddahl
commit 91300ac3b4
5 changed files with 24 additions and 14 deletions

View file

@ -136,7 +136,7 @@ void FHWModelRenderer::SetInterpolation(double inter)
void FHWModelRenderer::SetMaterial(FGameTexture *skin, bool clampNoFilter, FTranslationID translation, AActor * act)
{
state.SetMaterial(skin, UF_Skin, 0, clampNoFilter ? CLAMP_NOFILTER : CLAMP_NONE, translation, -1);
state.SetMaterial(skin, UF_Skin, 0, clampNoFilter ? CLAMP_NOFILTER : CLAMP_NONE, translation, -1, act ? act->GetClass() : nullptr);
state.SetLightIndex(modellightindex);
}

View file

@ -238,7 +238,7 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
}
uint32_t spritetype = actor? uint32_t(actor->renderflags & RF_SPRITETYPEMASK) : 0;
if (texture) state.SetMaterial(texture, UF_Sprite, (spritetype == RF_FACESPRITE) ? CTF_Expand : 0, clampmode, translation, OverrideShader);
if (texture) state.SetMaterial(texture, UF_Sprite, (spritetype == RF_FACESPRITE) ? CTF_Expand : 0, clampmode, translation, OverrideShader, actor ? actor->GetClass() : nullptr);
else if (!modelframe) state.EnableTexture(false);
//SetColor(lightlevel, rel, Colormap, trans);