OpenGL Ray-Tracing

Hej Forum.

need help, very fast. I do a project now, which must be done until tomorrow. Cant solve one problem, google seems to be not my friend now ;(

Ray-Tracing builds a ray for every pixel of the screen, which is then used to check collision with objects in the 3D-room.

I dont know how to builld this ray-vector, if u know only the (x,y)-coordinates of ur screen. In the case that (x,y) are in the middle of the screen, u just can use the view-vector of the camera. If not, u have to transform (x,y) of screen to (x,y,z) of world-coordinates. BUT HOW?

Thanx for ur helping!!! <3
Comments
5
is this some sort of christian magic?
Jesus was more into 8-bit gaming.
Parent
err a ray is a line with one endpoint, so get the origin then take the required direction vector and normalise it, the only point at which world coords are important are the origin of the ray !
Back to top