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

Thread: projective texture mapping and shadow mapping

  1. #1
    Newbie Newbie
    Join Date
    Oct 2012
    Posts
    1

    projective texture mapping and shadow mapping

    I am trying to implement projective texture mapping in opengl. Suppose there is a projector ,which project a image onto the model. Hopfully,I need only front side can be painted by image and back side should be occluded. How to do that?


    Could anyone help me about that?

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,211
    Look at the diagram on this page under Projective Texturing:

    * Shadow Mapping (Paul's Projects)

    Read the text for more details on how it works.

    Of course nowadays you wouldn't use the fixed-function texture coordinate generation (GL_TEXTURE_GEN* stuff) ... you'd just pass the matrix into a shader uniform and use it directly in your shader math to generate the texture coordinates. Simpler.
    Last edited by Dark Photon; 10-08-2012 at 07:06 PM.

Posting Permissions

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