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: Computing radiance in world space, object space or view space?

Hybrid View

  1. #1
    Intern Contributor
    Join Date
    Jun 2011
    Posts
    89

    Unhappy Computing radiance in world space, object space or view space?

    What's the most convenient coordinate space to evaluate a shading model, say the Phong shading model in the shader program. Personally, the world space is the easiest, but people often do that in the view(eye) space.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,124
    Quote Originally Posted by shapeare View Post
    What's the most convenient coordinate space to evaluate a shading model, say the Phong shading model in the shader program. Personally, the world space is the easiest, but people often do that in the view(eye) space.
    If your "world" is tiny, you probably don't care. Plenty of 32-bit float precision to go around.

    If it isn't, then world space is a poor choice, and you begin to see the benefits of doing this in eye space.

    They're both orthonormal spaces, and computing lighting/shading in each is functionally equivalent. You're going to get the same results subject to floating-point precision/accuracy (and that's the catch). Do what you want here.
    Last edited by Dark Photon; 07-25-2013 at 05:40 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
  •