Jump to content

OpenGL Render Order


Recommended Posts

PrBoom and other ports render in order of flats, walls, then things (sprites).

 

Far-to-near render order makes sense to handle transparency correctly, but I've noticed strange issues where transparent walls clip sprites if they are rendered last. The only way I've found to ensure correct sprite rendering is to render walls as the last step (i.e., swap the last two steps and render walls at the very end).

 

This seems fine since there is a depth buffer, but I wonder if anyone knows of a hidden danger of swapping the render order like this.

 

I would guess that this is just a holdover from the way the original source rendered sprites last, but I'm not sure.

Share this post


Link to post

To do it properly you have to thoroughly sort all translucent objects by distance and split them, if they intersect. Sprites are normally not split by walls because this can cause different artifacts that may look even worse.

 

That said, to my knowledge PrBoom does not implement a proper translucency sorter but only a simplified one. Those are far more likely to produce artifacts.

 

 

Share this post


Link to post
2 minutes ago, Graf Zahl said:

To do it properly you have to thoroughly sort all translucent objects by distance and split them, if they intersect. Sprites are normally not split by walls because this can cause different artifacts that may look even worse.

 

That said, to my knowledge PrBoom does not implement a proper translucency sorter but only a simplified one. Those are far more likely to produce artifacts.

 

 

 

Ah, yes. This is what I assumed but it's good to have someone much more knowledgeable than me comment on it. Thank you. :)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...