Blending mode for Transparent fog?

Member
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:

glClear
Translate camera
draw skybox with fog disabled
draw terrain with fog enabled
Quote this message in a reply
Luminary
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
Moderator
Posts: 443
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:

http://www.sgi.com/software/opengl/advan...de122.html

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 3,029 Aug 27, 2007 01:38 AM
Last Post: kordeul
  general blending versus texture blending questions WhatMeWorry 2 5,576 Dec 7, 2006 02:43 PM
Last Post: arekkusu
  OpenGL, SDL, and Transparent Bitmaps RyanA 4 4,587 Jun 26, 2006 04:26 PM
Last Post: RyanA
  Additive/Subtractive blending mode for particle systems TomorrowPlusX 2 5,319 Dec 10, 2004 05:29 AM
Last Post: TomorrowPlusX
  About transparent colors un textures valle 2 3,089 Oct 26, 2004 09:52 AM
Last Post: valle