Author Topic: Atmospheric haze  (Read 1541 times)

Offline AW999

  • int
  • **
  • Posts: 57
    • View Profile
Atmospheric haze
« on: December 21, 2009, 12:11:19 pm »
Since the built-in fog effect apparently works well only when the fog is 'black' (according to one of the files or wiki articles), what's the best way to produce atmospheric haze - i.e., making distant parts of the landscape look bluer? 

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11970
    • View Profile
    • http://www.jpct.net
Re: Atmospheric haze
« Reply #1 on: December 21, 2009, 12:29:42 pm »
...using which renderer?

Offline AW999

  • int
  • **
  • Posts: 57
    • View Profile
Re: Atmospheric haze
« Reply #2 on: December 21, 2009, 08:11:00 pm »
...using which renderer?

  Well, ideally I'd need my applet to be as widely compatible as possible, so presumably all of the rendering modes.
 

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11970
    • View Profile
    • http://www.jpct.net
Re: Atmospheric haze
« Reply #3 on: December 21, 2009, 08:53:52 pm »
I see. The limitation of the fading color is valid only for the per polygon fog mode, which is default but actually outdated. You can enable per pixel fog for both renderers with any target color you like. For the hardware renderers, there's no problem with that at all. For the software render, the fog is applied in a post processing step based on the data in the depth buffer. This costs some performance (but benefits from multi core machines) and it has a problem with transparent objects. If this applies to your application, have a look at http://www.jpct.net/forum2/index.php/topic,1436.0.html for solution.