Jump to content
  • Advertisement
Sign in to follow this  
Robbbert

Blending problem with spheres

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

I've got a problem with my first simple solar system program. I made an Earth using gluSphere(quadratic,0.2f,32,32); and an atmosphere using gluSphere(quadratic,0.22f,32,32); The atmosphere is blended with glBlendFunc(GL_SRC_ALPHA,GL_ONE); The Earth and atmosphere are at the same position. It looks like this: The clouds are not blended correctly. Without the Earth you can see what I mean: With glDisable(GL_DEPTH_TEST); I don't get the right effect: And with glDepthMask(GL_FALSE); I get another strange effect: Did I something wrong or used the wrong method? How can I make an Earth with atmosphere without strange black lines? Thanks for your help! (Sorry for my bad English) [Edited by - Robbbert on November 8, 2004 12:15:59 PM]

Share this post


Link to post
Share on other sites
Advertisement
- Enable front face culling
- Render atmosphere
- Enable back face culling
- Render planet
- Render atmosphere

You don't need to disable depth buffer or even depth writes.

Share this post


Link to post
Share on other sites
Quote:
Original post by llvllatrix
Where did you get the textures?
I also have a earth texture here. I think I got it from USGS (US Geological Survey) and it's 8k x 4k RGB888. Definetly an overkill.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!