我正在尝试用水波和折射创建一个OpenGL应用程序。 我需要从太阳投射光线然后照相机并弄清楚它们相交的位置,或者我需要从海底开始并找出我必须去哪个方向(s,如果有的话)才能击中太阳或相机。 我有点卡住了,任何人都可以给我一个OpenGL光线投射或高级几何的速成课程吗? 我不希望海底处于恒定的深度,我不希望水波是简单的正弦波。
I'm trying to create an OpenGL application with water waves and refraction. I need to either cast rays from the sun and then the camera and figure out where they intersect, or I need to start from the ocean floor and figure out in which direction(s, if any) I have to go in order to hit the sun or the camera. I'm kind of stuck, can any one give me an inpoint into either OpenGL ray casting or a crash course in advanced geometry? I don't want the ocean floor to be at a constant depth and I don't want the water waves to be simple sinusoidal waves.
更多推荐
发布评论