Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /examples/vr-demo/vr.diderot
ViewVC logotype

Diff of /examples/vr-demo/vr.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2069, Fri Nov 2 13:49:51 2012 UTC revision 2070, Fri Nov 2 14:28:20 2012 UTC
# Line 55  Line 55 
55  strand RayCast (int ui, int vi)  strand RayCast (int ui, int vi)
56  {  {
57      real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5);      real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5);
58      real rayV = lerp(-camVmax, camVmax, -0.5, real(vi), real(imgResV)-0.5);    // we flip the v coordinate, since we are using DrawPixels to render the image
59        real rayV = lerp(-camVmax, camVmax, -0.5, real(imgResV - vi - 1), real(imgResV)-0.5);
60      vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist;      vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist;
61      vec3 toEye = normalize(-rayVec);      vec3 toEye = normalize(-rayVec);
62    

Legend:
Removed from v.2069  
changed lines
  Added in v.2070

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0