equal
deleted
inserted
replaced
75 eye = eye + fw*p + left*u + up*v; |
75 eye = eye + fw*p + left*u + up*v; |
76 } |
76 } |
77 |
77 |
78 Ray Camera::makeRay(Sample *samp) |
78 Ray Camera::makeRay(Sample *samp) |
79 { |
79 { |
80 Vector3 dir = p + u*(0.5/f)*samp->x + v*(-0.5/f)*samp->y; |
80 Vector3 dir = p + (u*samp->x - v*samp->y)*F; |
81 dir.normalize(); |
81 dir.normalize(); |
82 return Ray(eye, dir); |
82 return Ray(eye, dir); |
83 } |
83 } |
84 |
84 |
85 /* http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtinter3.htm */ |
85 /* http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtinter3.htm */ |