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: gl_LightSource[i].halfVector not working on Intel HD3000

Hybrid View

  1. #1
    Intern Contributor
    Join Date
    Nov 2010
    Posts
    81

    gl_LightSource[i].halfVector not working on Intel HD3000

    Hi,

    it seems the gl_LightSource[i].halfVector data is wrong on the Intel HD 3000 graphics card with the latest driver (9.17.10.2875), running OpenGL 3.1 and GLSL 1.40.

    I tried computing it by myself and my phong shader now works fine.

    Is this happening because the built-ins are deprecated and have been removed?

  2. #2
    Intern Contributor
    Join Date
    Aug 2009
    Posts
    78
    I think the reason is that most implementations try to keep it (too) simple and assume the vector to the viewer simply to be (0,0,1) for any vertex. With the default camera pointing in negative z direction (0,0,-1) this is only true if the vertex under consideration lies on the view axis of the camera (z axis). In other words the more off-centered a vertex is in device coordinates (screen), the worse it gets.

    To my knowledge, this is neither hardware- nor driver dependent. Since i had the same problem on my GF560 it seems it is also not vendor specific.

  3. #3
    Intern Contributor
    Join Date
    Nov 2010
    Posts
    81
    Hi,

    thanks for the answer.
    So it's better to compute it by ourselves, right?

  4. #4
    Intern Contributor
    Join Date
    Aug 2009
    Posts
    78
    For a better quality, yes. However, there might be cases where the described simplification is acceptable, for example when most shaded geometry is close to the middle of the screen or maybe if there is a really hard limit on the fps to be achieved...

    I do compute them myself.

  5. #5
    Intern Contributor
    Join Date
    Nov 2010
    Posts
    81
    Hi,

    Thank you

Posting Permissions

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