edit (as the first post was not accurate)cowdog wrote:Lakys, can you explain this?Cornea = 1.336/1.376=0.97
What I do know is that sin theta1/sin thetat2 = IOR 2/ IOR 1 and that the inverse sin of the above quotient gives us the critical angle for internal reflection. I just don't get why you would assign this quotient as the IOR for the cornea...
You are correct about Snell's Law.
However, you forgot how it is used into the shader.
The D|S shader considers only the material index of refraction (let's call this n) and assumes the outside is air (or physically speaking vacuum with an index of refraction of 1.0).
So you can write it this way sin өi = n sin өr where өi is the incident angle and өr the refracted angle (from the normal).
n is there the index of refraction involved to calculate the refraction of a ray passing throught outside to the inside of a surface.
The shader uses 1/n for the reverse operation (inside to outside).
If instead of this, you wish to create a surface reproducing the behaviour of the refraction resulting from a material with an index of refraction n1 and an index of refraction n2, you will still use the same law
sin ө1 = n2/n1 sin ө2
so it is equivalent to use the shader with the input n parameter replacing it with n2/n1.
So if n1 = 1.376 and n2 = 1.336, n = n2/n1 = 0.97 (approximatively).
The rays will be bended (refracted) the same way.
Rather simple no?