Blending mode for Transparent fog?
What blending mode should I use for transparent fog? I set the fog color to 1.0, 1.0, 1.0, 0.0, then:
glClear
Translate camera
draw skybox with fog disabled
draw terrain with fog enabled
glClear
Translate camera
draw skybox with fog disabled
draw terrain with fog enabled
OpenGL fog doesn't require blending to be enabled, and isn't affected by the blend function.
Are you referring to the different fog functions that OpenGL gives you? I would start with GL_LINEAR (I think it's faster.) It'll probably look fine. But if things bother you about it, or you are concerned with approximating the physical world, then it might be worth looking at the two exponential functions. I just found a good explanation of them here:
http://www.sgi.com/software/opengl/advan...de122.html
http://www.sgi.com/software/opengl/advan...de122.html
Measure twice, cut once, curse three or four times.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Transparent textures | kordeul | 2 | 2,149 |
Aug 27, 2007 01:38 AM Last Post: kordeul |
|
| general blending versus texture blending questions | WhatMeWorry | 2 | 4,244 |
Dec 7, 2006 02:43 PM Last Post: arekkusu |
|
| OpenGL, SDL, and Transparent Bitmaps | RyanA | 4 | 3,351 |
Jun 26, 2006 04:26 PM Last Post: RyanA |
|
| Additive/Subtractive blending mode for particle systems | TomorrowPlusX | 2 | 3,958 |
Dec 10, 2004 05:29 AM Last Post: TomorrowPlusX |
|
| About transparent colors un textures | valle | 2 | 2,473 |
Oct 26, 2004 09:52 AM Last Post: valle |
|

