implement per-class globalshaders
This commit is contained in:
parent
8c3268ae1c
commit
91300ac3b4
5 changed files with 24 additions and 14 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue