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 903, Thu Apr 21 14:09:20 2011 UTC revision 907, Thu Apr 21 17:51:26 2011 UTC
# Line 61  Line 61 
61  //field#4(3)[] F = img ⊛ bspln5;  //field#4(3)[] F = img ⊛ bspln5;
62  field#2(3)[] F = img ⊛ bspln3;  field#2(3)[] F = img ⊛ bspln3;
63  //field#1(3)[] F = img ⊛ ctmr;  //field#1(3)[] F = img ⊛ ctmr;
64  //field#0(3)[] F = img ⊛ tent;  //field#1(3)[] F = img ⊛ c1tent;
65    
66  strand RayCast (int ui, int vi)  strand RayCast (int ui, int vi)
67  {  {
# Line 88  Line 88 
88                real alpha = min(1.0, lerp(0.0, 1.0, valOpacMin, val, valOpacMax));                real alpha = min(1.0, lerp(0.0, 1.0, valOpacMin, val, valOpacMax));
89                real ld = max(0.0, norm • lightDir);                real ld = max(0.0, norm • lightDir);
90                real hd = max(0.0, norm • normalize(lightDir + normalize(camEye - rayPos)));                real hd = max(0.0, norm • normalize(lightDir + normalize(camEye - rayPos)));
91                // contrived assignment of color to position                // contrived assignment of RGB from XYZ
92                vec3 matRGB = [lerp(0.2, 1.0, 0.0, rayPos[0], 8.0),                vec3 matRGB = [lerp(0.2, 1.0, 1.0, rayPos[0], 8.0),
93                               lerp(0.2, 1.0, 0.0, rayPos[1], 8.0),                               lerp(0.2, 1.0, 1.0, rayPos[1], 8.0),
94                               lerp(0.2, 1.0, 0.0, rayPos[2], 8.0)];                               lerp(0.2, 1.0, 1.0, rayPos[2], 8.0)];
95                vec3 pntRGB = (phongKa*matRGB                vec3 pntRGB = (phongKa*matRGB
96                               + phongKd*ld*modulate(matRGB, lightRGB)                               + phongKd*ld*modulate(matRGB, lightRGB)
97                               + phongKs*hd^phongSp*lightRGB);                               + phongKs*hd^phongSp*lightRGB);
98                rayRGB = rayRGB + rayTransp*alpha*pntRGB;                rayRGB = rayRGB + rayTransp*alpha*pntRGB;
   
99                rayTransp = rayTransp*(1.0 - alpha);                rayTransp = rayTransp*(1.0 - alpha);
100            }            }
101            // ##########  END  per-sample code            // ##########  END  per-sample code

Legend:
Removed from v.903  
changed lines
  Added in v.907

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