Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ebola_Influenza

OpenGL OpenGL depth test failing with alpha blending

This topic is 5157 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Problem is, when I enabled lighting (with alpha blending transparency effects), OpenGL no longer renders my objects in their correct z-depth. Now, several articles online say that for alpha blending to work, you must sort & render your primitives from farthest to nearest. Has anybody been able to achieve correct z-depth drawing (&testing) with transparency without having to sort all your primitives? If so, how? Many kudos in advance! Robert

Share this post


Link to post
Share on other sites
Advertisement
Render all non transparent objects.
Sort your transparent objects (this step is optional, but it''s better if you do)
Keep the Z test check, but disable Z buffer write.
Render transparent objects.

Share this post


Link to post
Share on other sites
Thank you Raduprv & Myopic Rhino for responding with real answers. Not what i wanted to hear, but real. Yep, you've got to work within the system, but when you like your job....

Thanks Myopic Rhino for the link, too.

Robert

[edited by - Ebola_Influenza on June 1, 2004 12:38:03 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!