Blending mode for Transparent fog?

Posts: 45
Joined: 2006.11
Post: #1
What blending mode should I use for transparent fog? I set the fog color to 1.0, 1.0, 1.0, 0.0, then:

Translate camera
draw skybox with fog disabled
draw terrain with fog enabled
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
OpenGL fog doesn't require blending to be enabled, and isn't affected by the blend function.
Quote this message in a reply
Posts: 441
Joined: 2002.09
Post: #3
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:

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Transparent textures kordeul 2 2,860 Aug 27, 2007 01:38 AM
Last Post: kordeul
  general blending versus texture blending questions WhatMeWorry 2 5,407 Dec 7, 2006 02:43 PM
Last Post: arekkusu
  Additive/Subtractive blending mode for particle systems TomorrowPlusX 2 5,078 Dec 10, 2004 05:29 AM
Last Post: TomorrowPlusX
  Blending and transparent overlays Feanor 16 8,261 Aug 25, 2003 01:33 PM
Last Post: OneSadCookie
  Transparent Color? Josh 6 6,259 Apr 22, 2002 05:27 AM
Last Post: Josh