Jump to content
  • Advertisement


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


blending not quite working ...

This topic is 6193 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

hello, I''m having some trouble with blending. Transparent objects don''t show up quite right when theres an opaque object behind it. Best way to describe this is to show you.. heres an exe i uploaded: http://www.postmodernist.com/richard/SolarSystem001.rar Currently, the objects are drawn in the following order: 1. the earth (opaque) 2. earth''s clouds (alpha = 0.7) 3. earth''s atmosphere (alpha = 0.5) 4. earth''s moon (opaque) 5. the sun thanks for any help, rich

Share this post

Link to post
Share on other sites
From what I've done with this subject, is that when doing blending of different 3D objects, you need to disable the depth mask when drawing the blended object.

Something like:

// draw non-blended objects here


glBlendFunc(GL_SRC_ALPHA, GL_ONE);

// draw blended object here


Play around with that and see if you can get what you want.

- Mike

P.S. I didn't download the program (rar format is not popular, use zip) so this may not be correct.

EDIT: typo

Edited by - mkaltner on November 8, 2001 7:01:30 PM

Share this post

Link to post
Share on other sites
thanks for the reply

I tried the depthmask true/false and it works. I was using it already but in the wrong way.

much appreciated

btw, uploaded as .zip, use down arrow to move back a bit so you can see the sun

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!