Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Fog?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Osby, Sweden
    Posts
    15

    Fog?

    It doesn't matter what value i put in the glFogf(GL_FOG_START, 1.0f);
    glFogf(GL_FOG_END, 5.0f);
    It always look the same!
    Any ideas?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: Fog?

    This will only work with linear fog, so check that you are using this type of fog (and not GL_EXP or GL_EXP2 !).

    Moreover, it can be a density problem...

    Can you describe more precisely what you see on the screen ? (And what you'd like to see ! )

    Eric

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Osby, Sweden
    Posts
    15

    Re: Fog?

    Im using GL_EXP2 now.
    I want to be able to move the fog forward and backwards, thats what
    glFogf(GL_FOG_START, 1.0f); is made for ? or have i got this completely wrong?
    I dont have my compiler here right now so i cant try GL_LINEAR right now, i hope that's the problem

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Osby, Sweden
    Posts
    15

    Re: Fog?

    oh i forgott, when i use GL_EXP2 i see fog but i cant change it forwards and backwards only the density.

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: Fog?

    The GL_START and GL_END tokens will only work with linear fog. You can not set fog start and end for exp or exp2 fogs !

    You should have a look at volumetric fog topics if you are looking for more realistic fog than basic OpenGL one...

    Eric

  6. #6
    Intern Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    55

    Re: Fog?

    Remember that exp(0)=1, and linear(0)=0, so the fog is *really* different if you are in exp (or exp2) or if you're in linear !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •