g2.1.pre-343-g717c82e Sprites in front of models

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
Enjay
Developer
Developer
Posts: 4753
Joined: Tue Aug 30, 2005 23:19
Location: Scotland

g2.1.pre-343-g717c82e Sprites in front of models

Post by Enjay »

I noticed this when playing with this mod:

http://forum.zdoom.org/viewtopic.php?f=37&t=45628

For whatever reason, the sprites on the far side of the test area are drawn in front of the explosion models.

The enemy sprites are far away:
Image

But they are drawn in front of the closer explosion models
Image

Image

I was shooting at the ground in that stepped down square area.

Something to do with the model actor being translucent?

Anyway, it's worth mentioning that it doesn't happen everywhere. If I walk forward a bit...

Image
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: g2.1.pre-343-g717c82e Sprites in front of models

Post by Graf Zahl »

After scratching my head for far too long I finally figured out what's happening here:

This is one of those nasty edge cases I never considered when writing the code for sorting translucent geometry.
Models aren't split by other elements that need to get sorted. In this case it's a translucent 3D floor in one of the rooms in the background. The model ends up in the wrong half of the list and gets drawn too early.

I'll have to see if this can be solved with hardware clipping planes, if that works out it could also be used to render models properly with 3D sector lights.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: g2.1.pre-343-g717c82e Sprites in front of models

Post by Graf Zahl »

It's fixed. This will also address the same issue with xy-billboarded sprites and translucent walls in sloped sectors.
User avatar
Enjay
Developer
Developer
Posts: 4753
Joined: Tue Aug 30, 2005 23:19
Location: Scotland

Re: g2.1.pre-343-g717c82e Sprites in front of models

Post by Enjay »

I'm glad you were able to sort this one out and that it had positive consequences for other issues too. Thanks for fixing it. :)

Return to “Closed Bugs”