我做光线追踪和我用下面的关系光线的折射(我从PDF格式被称为重新FL ections和折射的光线跟踪得到了它):
I am doing ray tracing and I do the refraction of the ray using the following relation (I got it from PDF called "Reflections and Refractions in Ray Tracing"):
不过,我已经看到它在其他PDF如下:
But I have seen it in another PDF as follows:
能否请您给我解释一下为什么?
Could you please explain for me why?
和我怎么能放心了,我计算我的折射矢量是否正确?
And how can I reassure that my refraction vector that I calculated is correct?
感谢
假设你的载体实际上是某某三胞胎:
Assuming that your vectors are actually xyz triplets:
float3 reflect( float3 i, float3 n )
{
return i - 2.0 * n * dot(n,i);
}
上一篇:/lib/i386-linux-gnu/libc.so.6,/lib/x86_64-linux-gnu/libc.so.6和/usr/lib/x86_64-linux-gnu/libc.so之间的区别
下一篇:我们能不能在32位Oracle服务器从64位客户端和一个副反之亦然连接?反之亦然、客户端、服务器、Oracle