- use texture clamping for all sprites.

This commit is contained in:
Christoph Oelckers 2021-03-29 20:18:49 +02:00
parent 2d0360fa55
commit ab9c7de147
3 changed files with 3 additions and 3 deletions

View file

@ -204,7 +204,7 @@ void HWFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent)
if (!texture->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_threshold); if (!texture->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_threshold);
else state.AlphaFunc(Alpha_GEqual, 0.f); else state.AlphaFunc(Alpha_GEqual, 0.f);
} }
state.SetMaterial(texture, UF_Texture, 0, 0/*flags & 3*/, TRANSLATION(Translation_Remap + curbasepal, palette), -1); state.SetMaterial(texture, UF_Texture, 0, sprite == nullptr? CLAMP_NONE : CLAMP_XY, TRANSLATION(Translation_Remap + curbasepal, palette), -1);
state.SetLightIndex(dynlightindex); state.SetLightIndex(dynlightindex);
state.Draw(DT_Triangles, vertindex, vertcount); state.Draw(DT_Triangles, vertindex, vertcount);

View file

@ -133,7 +133,7 @@ void HWSprite::DrawSprite(HWDrawInfo* di, FRenderState& state, bool translucent)
// The shade rgb from the tint is ignored here. // The shade rgb from the tint is ignored here.
state.SetColorAlpha(PalEntry(255, globalr, globalg, globalb), alpha); state.SetColorAlpha(PalEntry(255, globalr, globalg, globalb), alpha);
state.SetMaterial(texture, UF_Texture, 0, 0/*flags & 3*/, TRANSLATION(Translation_Remap + curbasepal, palette), -1); state.SetMaterial(texture, UF_Texture, 0, CLAMP_XY, TRANSLATION(Translation_Remap + curbasepal, palette), -1);
if (!modelframe) if (!modelframe)

View file

@ -192,7 +192,7 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
{ {
//int tmode = state.GetTextureMode(); //int tmode = state.GetTextureMode();
state.SetMaterial(texture, UF_Texture, 0, 0/*flags & 3*/, TRANSLATION(Translation_Remap + curbasepal, palette), -1); state.SetMaterial(texture, UF_Texture, 0, sprite == nullptr? CLAMP_NONE : CLAMP_XY, TRANSLATION(Translation_Remap + curbasepal, palette), -1);
SetLightAndFog(state); SetLightAndFog(state);