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

Thread: shadow

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2000
    Location
    CA
    Posts
    3

    shadow

    How to produce a shadow of 3D object(such as cube) with respect to light?
    Is there any algorithm to deal with that problem? or does there exist a set of function in opengl to solve that problem?
    Lin

  2. #2
    Guest

    Re: shadow

    no nothing is built in, but if you do a search here I think you will find an anser

  3. #3
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Austin, TX, USA
    Posts
    150

    Re: shadow

    Search www.nvidia.com in the developer section. Mark Kilgard wrote a white paper on stencil buffering (VGIMO), and it has a rather large section dealing with shadow generation using stencil. Granted, the shadows using this technique aren't near what you would get with raytracing/casting or some other algorithm, but it will be realtime (assuming you have a card that supports 1/8/16 stencil bits).

    Have a look and pull down some of the Nvidia demos/source as well.

    Enjoy!

    Glossifah

  4. #4
    Junior Member Newbie
    Join Date
    Oct 2000
    Posts
    13

    Re: shadow

    I haven't tested it yet but i think you can create a shadow with the glScale function.
    A scale value of zero collapses all object coordinates along that axis to zero.

Posting Permissions

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