PDA

View Full Version : Accuracy of the "refract" instruction



funkeejeffou
09-19-2007, 06:27 AM
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.

Zengar
09-19-2007, 07:36 AM
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)

Flavious
09-19-2007, 09:34 AM
And for a wonderful derivation of this, see Glassner's classic text, volume 2.

Korval
09-19-2007, 12:27 PM
see Glassner's classic text, volume 2.The name of this classic text being... what?

Flavious
09-19-2007, 12:37 PM
Sorry, it's Andrew Glassner's Principles of Digital Image Synthesis.

funkeejeffou
09-19-2007, 10:25 PM
Thanks for your replies, I am going to check these out and I'll post the answer that I will come to.

Cheers,
Jeff.