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

Thread: cube maps for nomalisation

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Denmark
    Posts
    12

    cube maps for nomalisation

    Trying to figure out how to do some per-pixel stuff, I am now stuck at the cube maps for normalisation.

    It is clear to me what the purpose is, but:

    - how does it work? I really hate not understanding it.. some hints would be nice
    - how do i generate it?
    - will one be enough, or will i need more?

  2. #2
    Intern Contributor
    Join Date
    Dec 2000
    Location
    Redmond, WA
    Posts
    64

    Re: cube maps for nomalisation

    You can have a look at the source for the RADEONCombine3SpecMap sample for code to generate and use a normalizing cube map. Look for the function generateCubemap(). You should only need one of these in your application, though you may reference it multiple times in a given fragment shader.

    -Jason

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    The Round Table at Camelot
    Posts
    1,264

    Re: cube maps for nomalisation

    You can also find it in one of the NVIDIA glh headers. I think it is in glh_cubemap.h. Thats the one i use, but what i did was copy and paste just the normalcubemap part in my own code and modified it for me. The main thing i had to do was make my own function to convert a normal vector from [-1,1] to an RGB value of [0,255]. For some reason i couldnt find that function in that glh header so thats why i made my own.

    Also, check http://www.nutty.org . He has a per pixel lighting demo (for geforce cards) that uses one of these cubemaps. Its a great demo to get started on this kind of thing.

    -SirKnight
    -SirKnight

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Denmark
    Posts
    12

    Re: cube maps for nomalisation

    hmm, well actually what i needed was to understand _how_ a cubemap normalises a vector.

    Can anyone give me any hints?

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Denmark
    Posts
    12

    Re: cube maps for nomalisation

    Nevermind, I have it figured now, I should have read that ext_cube_map spec before.

    Thank you for your replies.

Posting Permissions

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