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

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/vr-lite-cam.diderot
ViewVC logotype

Diff of /branches/pure-cfg/test/vr-lite-cam.diderot

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

revision 704, Tue Mar 29 17:46:40 2011 UTC revision 706, Tue Mar 29 20:20:38 2011 UTC
# Line 51  Line 51 
51  real camUmax = camVmax*real(imgResU)/real(imgResV);  real camUmax = camVmax*real(imgResU)/real(imgResV);
52    
53  vec3 lightVspDir = [0.9, -1.0, -2.5];  vec3 lightVspDir = [0.9, -1.0, -2.5];
54  // HEY (want) ability to access components of a vector (e.g. "vec[0]")  vec3 tmp2 = lightVspDir[0]*camU + lightVspDir[1]*camV + lightVspDir[2]*camN;
 // would make this transform to world-space less awkward; would be  
 // lightVspDir[0]*camU + lightVspDir[1]*camV + lightVspDir[2]*camN  
 // OR, we could create and apply a view-to-world matrix transform  
 //vec3 tmp2 = lightVspDir[0]*camU + lightVspDir[1]*camV + lightVspDir[2]*camN;  
 vec3 tmp2 = (  dot(lightVspDir,[1.0,0.0,0.0])*camU  
              + dot(lightVspDir,[0.0,1.0,0.0])*camV  
              + dot(lightVspDir,[0.0,0.0,1.0])*camN);  
55  vec3 lightDir = tmp2/|tmp2|;  vec3 lightDir = tmp2/|tmp2|;
56    
57  real phongKa = 0.05;  real phongKa = 0.05;

Legend:
Removed from v.704  
changed lines
  Added in v.706

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