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

Thread: Accuracy of the "refract" instruction

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    25

    Accuracy of the "refract" instruction

    Hi all,

    I was wondering if the refract instruction in GLSL is accurate from a physical point of view.
    I mean that, is the vectorial approach used to compute the refraction vector in GLSL gives the same result as if we applied the law of Snell-Descartes in Physics ?

    If it is an approximation, does someone know its quality ?

    Cheers,
    Jeff.

  2. #2
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,932

    Re: Accuracy of the "refract" instruction

    Maybe this site would help: http://en.wikipedia.org/wiki/Snell\'s_law

    On teh bottom, there is a derivation for a vector form of the law, just compare it to the one in the GLSL specification.

    (A hint: they are the same)

  3. #3
    Intern Contributor
    Join Date
    Jun 2006
    Posts
    97

    Re: Accuracy of the "refract" instruction

    And for a wonderful derivation of this, see Glassner's classic text, volume 2.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,575

    Re: Accuracy of the "refract" instruction

    see Glassner's classic text, volume 2.
    The name of this classic text being... what?

  5. #5
    Intern Contributor
    Join Date
    Jun 2006
    Posts
    97

    Re: Accuracy of the "refract" instruction

    Sorry, it's Andrew Glassner's Principles of Digital Image Synthesis.

  6. #6
    Junior Member Newbie
    Join Date
    Mar 2005
    Posts
    25

    Re: Accuracy of the "refract" instruction

    Thanks for your replies, I am going to check these out and I'll post the answer that I will come to.

    Cheers,
    Jeff.

Posting Permissions

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