VOGONS


First post, by Gambit37

User metadata
Rank Oldbie
Rank
Oldbie

You previously told me about the limits of the PNG transparency Paul -- that two objects with semi-transparent pixels, when seen together, the topmost object would appear to punch holes in the background object where the semi-trans pixels occur.

However, I've noticed that this behaviour is inconsistent.

I can get the upper object to display perfectly with it's semi trans-pixels blended perfectly with the pixels of a lower semi-trans object. It's weird but it seems dependent on the direction the camera is facing and the number of items in view.

Do you know why this might happen?

Reply 1 of 4, by Glidos

User metadata
Rank l33t
Rank
l33t

Sorry, that's what I meant: it will look right from some angles and not others. TR uses a z buffer, and if the nearest object is drawn first, then the far one will not be rendered at all.

Reply 2 of 4, by Gambit37

User metadata
Rank Oldbie
Rank
Oldbie

Ah -- I updated the post with screenshots as you posted your reply.

What determines the drawing order?

Reply 3 of 4, by Glidos

User metadata
Rank l33t
Rank
l33t

As far as I can remember, I delay items that use transparency and render them last, so that - at least - these interactions don't happen between transparent and non-transparent items. I may be able to improve things further by sorting the transparent items before rendering - it would need to be a slightly strange type of sort though.

Reply 4 of 4, by Gambit37

User metadata
Rank Oldbie
Rank
Oldbie

Well, it's not a major issue -- most people playing quickly probably won't notice it. I was just curious really.