Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
JadingTsunami

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×