mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- 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:
parent
3c961a2aa2
commit
8d9d56c339
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue