Advertisement Jump to content


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


Fog & Alpha blending do not mix!!

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

Well I''m currently adding particle systems into my heightmap renderer and I''ve come across a problem. My heightmap is rendered using a quad tree, so I''ve added in some fog to hide the bits of terrain being added in the distance and also just for the general effect of it. I could just hide it by reducing my draw distance but I feel that looks a little ugly in comparison. If I increase the distance of the frustum so that the heightmap is rendered as far as the eye can see, I lose too much performance to make it worthwhile. Anyhoo, my question is about alpha blending. When I enable fog, any time a particle is covered with fog, the boundaries of the quad become extremely visible, if I get close enough the particle renders fine, perfectly transparent at the edges, if I move a bit further away and it is covered by the fog, it becomes a ghastly block (albeit still slightly transparant)!! So does anyone know a way to stop fog affecting alpha blending, or is that just the way it works and theres no way to stop that effect bar removing the fog? Cheers, Steve AKA Mephs

Share this post

Link to post
Share on other sites
What kind of alpha blending are you using ? (ONE,ONE or SourceAlpha,InvSourceAlpha)
Is alpha test turned on ?
How is you scene sorted ? (ground,particle or mixed)

I have done alpha blending for trees and it works find with fog(SourceAlpha,InvSourceAlpha)

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!