src/scene.cc
branchpyrit
changeset 49 558fde7da82a
parent 47 320d5d466864
child 53 228cb8bfdd54
equal deleted inserted replaced
48:a4913301c626 49:558fde7da82a
    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 */