From ab9c7de147a033ac77b8f50864f6c79b887c0630 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 29 Mar 2021 20:18:49 +0200 Subject: [PATCH] - use texture clamping for all sprites. --- source/core/rendering/scene/hw_flats.cpp | 2 +- source/core/rendering/scene/hw_sprites.cpp | 2 +- source/core/rendering/scene/hw_walls.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/rendering/scene/hw_flats.cpp b/source/core/rendering/scene/hw_flats.cpp index 40a71611f..28c010db7 100644 --- a/source/core/rendering/scene/hw_flats.cpp +++ b/source/core/rendering/scene/hw_flats.cpp @@ -204,7 +204,7 @@ void HWFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent) if (!texture->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_threshold); 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.Draw(DT_Triangles, vertindex, vertcount); diff --git a/source/core/rendering/scene/hw_sprites.cpp b/source/core/rendering/scene/hw_sprites.cpp index fa9f9d8ef..390d7ccc1 100644 --- a/source/core/rendering/scene/hw_sprites.cpp +++ b/source/core/rendering/scene/hw_sprites.cpp @@ -133,7 +133,7 @@ void HWSprite::DrawSprite(HWDrawInfo* di, FRenderState& state, bool translucent) // The shade rgb from the tint is ignored here. 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) diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 6d2fda38f..c4407a648 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -192,7 +192,7 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags) { //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);