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

SCM Repository

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

Diff of /branches/pure-cfg/test/vr-kcomp.diderot

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

revision 791, Fri Apr 8 20:36:22 2011 UTC revision 827, Sat Apr 16 00:40:34 2011 UTC
# Line 44  Line 44 
44      real gray = 0.0;      real gray = 0.0;
45      int myui = ui;      int myui = ui;
46      int myvi = vi;      int myvi = vi;
47        field#1(3)[] myFc0 = Fc0;
48        field#1(3)[] myFc1 = Fc1;
49      output vec4 rgba = [0.0, 0.0, 0.0, 0.0];      output vec4 rgba = [0.0, 0.0, 0.0, 0.0];
50      // ##########  END  per-ray initialization      // ##########  END  per-ray initialization
51    
# Line 57  Line 59 
59            // HEY (scoping BUG): the strand parameters (e.g. ui, vi) can't            // HEY (scoping BUG): the strand parameters (e.g. ui, vi) can't
60            // appear in conditionals            // appear in conditionals
61            if (myui + myvi < imgResU) {            if (myui + myvi < imgResU) {
62               val = Fc0@rayPos;               val = myFc0@rayPos;
63               norm = normalize(-∇Fc0@rayPos);               norm = normalize(-∇myFc0@rayPos);
64            } else {            } else {
65               val = Fc1@rayPos;               val = myFc1@rayPos;
66               norm = normalize(-∇Fc1@rayPos);               norm = normalize(-∇myFc1@rayPos);
67            }            }
68            if (val > valOpacMin) {  // we have some opacity            if (val > valOpacMin) {  // we have some opacity
69                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));
# Line 69  Line 71 
71                real hd = norm • normalize(lightDir + normalize(camEye - rayPos));                real hd = norm • normalize(lightDir + normalize(camEye - rayPos));
72                real mat = (  phongKa                real mat = (  phongKa
73                            + phongKd*(ld if ld > 0.0 else 0.0)                            + phongKd*(ld if ld > 0.0 else 0.0)
74                            + phongKs*(pow(hd, phongSp) if hd > 0.0 else 0.0));                            + phongKs*(hd^phongSp if hd > 0.0 else 0.0));
75                gray = gray + transp*opac*mat;                gray = gray + transp*opac*mat;
76                transp = transp*(1.0 - opac);                transp = transp*(1.0 - opac);
77            }            }

Legend:
Removed from v.791  
changed lines
  Added in v.827

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