mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 13:50:48 +00:00
- fixed sprite drawing with hqresized textures
This commit is contained in:
parent
4fc1b3231a
commit
9858ed70b0
1 changed files with 8 additions and 1 deletions
|
@ -68,6 +68,9 @@
|
||||||
#include "r_data/r_vanillatrans.h"
|
#include "r_data/r_vanillatrans.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, gl_light_sprites)
|
EXTERN_CVAR(Bool, gl_light_sprites)
|
||||||
|
EXTERN_CVAR(Int, gl_texture_hqresizemult)
|
||||||
|
EXTERN_CVAR(Int, gl_texture_hqresizemode)
|
||||||
|
EXTERN_CVAR(Int, gl_texture_hqresize_targets)
|
||||||
|
|
||||||
namespace swrenderer
|
namespace swrenderer
|
||||||
{
|
{
|
||||||
|
@ -130,7 +133,11 @@ namespace swrenderer
|
||||||
if (thing->renderflags & RF_SPRITEFLIP)
|
if (thing->renderflags & RF_SPRITEFLIP)
|
||||||
renderflags ^= RF_XFLIP;
|
renderflags ^= RF_XFLIP;
|
||||||
|
|
||||||
double yscale = spriteScale.Y / tex->GetScale().Y;
|
double yscale;
|
||||||
|
if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1 || !(gl_texture_hqresize_targets & 2))
|
||||||
|
yscale = spriteScale.Y / tex->GetScale().Y;
|
||||||
|
else
|
||||||
|
yscale = spriteScale.Y / tex->GetScale().Y / gl_texture_hqresizemult;
|
||||||
|
|
||||||
// store information in a vissprite
|
// store information in a vissprite
|
||||||
RenderSprite *vis = thread->FrameMemory->NewObject<RenderSprite>();
|
RenderSprite *vis = thread->FrameMemory->NewObject<RenderSprite>();
|
||||||
|
|
Loading…
Reference in a new issue