- push sprite shadows a little back for distance sorting

They always need to be behind sprites with the same distance.
This commit is contained in:
Christoph Oelckers 2021-10-05 13:57:31 +02:00
parent 3c961a2aa2
commit 8d9d56c339

View file

@ -976,6 +976,7 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
} }
depth = (float)((x - vp.Pos.X) * vp.TanCos + (y - vp.Pos.Y) * vp.TanSin); depth = (float)((x - vp.Pos.X) * vp.TanCos + (y - vp.Pos.Y) * vp.TanSin);
if (isSpriteShadow) depth += 1.f/65536.f; // always sort shadows behind the sprite.
// light calculation // light calculation