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

SCM Repository

[diderot] Diff of /branches/vis12/test/vr-kcomp2.diderot
ViewVC logotype

Diff of /branches/vis12/test/vr-kcomp2.diderot

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

revision 1115, Thu May 5 04:42:18 2011 UTC revision 1118, Thu May 5 04:57:49 2011 UTC
# Line 39  Line 39 
39      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);
40      real rayV = lerp(-camVmax, camVmax, -0.5, real(vi), real(imgResV)-0.5);      real rayV = lerp(-camVmax, camVmax, -0.5, real(vi), real(imgResV)-0.5);
41      vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist;      vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist;
42      vec3 rayDir = normalize(rayVec);      vec3 vv = normalize(-rayVec);
43    
44      real rayN = camVspNear;      real rayN = camVspNear;
45      // ########## BEGIN per-ray initialization      // ########## BEGIN per-ray initialization
# Line 64  Line 64 
64            if (val > valOpacMin) {  // we have some opacity            if (val > valOpacMin) {  // we have some opacity
65                real opac = min(1.0, lerp(0.0, 1.0, valOpacMin, val, valOpacMax));                real opac = min(1.0, lerp(0.0, 1.0, valOpacMin, val, valOpacMax));
66                real ld = lightDir • norm;                real ld = lightDir • norm;
67                real hd = norm • normalize(lightDir + normalize(camEye - rayPos));                real hd = norm • normalize(lightDir + vv);
68                real mat = (  phongKa                real mat = (  phongKa
69                            + phongKd*(ld if ld > 0.0 else 0.0)                            + phongKd*(ld if ld > 0.0 else 0.0)
70                            + phongKs*(hd^phongSp if hd > 0.0 else 0.0));                            + phongKs*(hd^phongSp if hd > 0.0 else 0.0));

Legend:
Removed from v.1115  
changed lines
  Added in v.1118

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