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 8 of 8

Thread: Attenuation map trouble

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    10

    Attenuation map trouble

    Hi there.
    Im using a 3D texture for per pixel correct attenuation. I can clearly "see" the sphere, but there also are some strange thick lines that seem to extand in the 6 directions (top bottom left ..).
    I have overlooked my code but cant find out the probleme.
    Im using GL_CLAMP_TO_EDGE, and im sure the texture is correct ..
    Any clue out there ?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Feb 2001
    Location
    Switzerland
    Posts
    1,840

    Re: Attenuation map trouble

    the outermost part of the cube has to be completely black, are you sure about that? it looks like the attentuationsphere touches the outsides of your textures (if it would be a solid cube, you would see some white dots in the middle of each side of the cube). this then gets expanded to infinity with gl_clamp or gl_clamp_to_edge..
    http://davepermen.net - if i could stay true to my heart, i would feel totally free

  3. #3
    Intern Newbie
    Join Date
    May 2002
    Location
    Wroclaw, Poland
    Posts
    39

    Re: Attenuation map trouble

    It's probably because of mipmapping. Make sure that there's a black border on ALL mipmap levels (so two smallest mipmaps have to be completely black actually). If you are sure that your base texture is correct, try to disable mipmapping to test if it's the case.

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    10

    Re: Attenuation map trouble

    It really is weard, i just changed the tex size, and now it works (well, seems like, at least ) .. that should not happen, as im sure the math is correct ..

    thanks anyway for trying to help

  5. #5
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Attenuation map trouble

    Changing the texture size would affect the MIP lod applied. If you reduced the size and it works then turn off MIP mapping on that texture (or load MIP levels). If you increased the size then you have a very strange problem.

    You need to fix this, because changing the screen resolution or user adjustable parameters like anisotropic texture & mip map quality could mess it up again.

  6. #6
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    10

    Re: Attenuation map trouble

    you're right, it _really_ is weird : i wasnt using mipmaping, and i increased the size .. anyway, it works just fine now ..
    maybe a bug in nvidia's linux driver ?

  7. #7
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    10

    Re: Attenuation map trouble

    Well .. dont know what to do ??.. i changed the screen res up to 1024, and i had to enlarge the texture, once again, to get rid of the problem ..

  8. #8
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Attenuation map trouble

    Hmm.... this has to be texture filters. Try a GL_NEAREST minification filter just for kicks.

Posting Permissions

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