troubleshooting Question

Alpha Transparency Problem

Avatar of RageDBL
RageDBL asked on
Game Programming
11 Comments2 Solutions500 ViewsLast Modified:
I'm having trouble with rendering some transparent polygons.
When I'm using z-buffer, if the first polygon in the vertex buffer is closer to the camera than the rest, then it doesn't blend with transparent ones behind it.
I have turned off z-buffer, and they will all blend, but because I have to render them separate from the ones that are z-buffered, that means that they are drawn on top of the other ones, and as a result, you can see them right through the solid polygons that were drawn with the z-buffer on.

My main problem is the blending. I want it to draw these polygons in BACK TO FRONT order of depth, so that the transparent polygons will always blend with the ones behind them, even if they are in the same vertex buffer.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros