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

SCM Repository

[diderot] Diff of /tests/vis15-bugs/dvrESbug.diderot
ViewVC logotype

Diff of /tests/vis15-bugs/dvrESbug.diderot

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

revision 4817, Tue Nov 1 18:39:13 2016 UTC revision 4818, Tue Nov 1 18:45:36 2016 UTC
# Line 18  Line 18 
18  input real phongKa ("Blinn-Phong ambient component") = 0.3;  input real phongKa ("Blinn-Phong ambient component") = 0.3;
19  input real phongKd ("Blinn-Phong diffuse component") = 0.8;  input real phongKd ("Blinn-Phong diffuse component") = 0.8;
20  input vec3 litdir ("direction (non-normalized) towards light source, in (U,V,N) view-space") = [-1, -2, -1];  input vec3 litdir ("direction (non-normalized) towards light source, in (U,V,N) view-space") = [-1, -2, -1];
 input image(1)[3] cmap ("univariate colormap") = image("isobow.nrrd");  
21    
22  /* Convolve volume data with one of various possible kernels;  /* Convolve volume data with one of various possible kernels;
23     see ../mip/mip.diderot for more info */     see ../mip/mip.diderot for more info */
# Line 30  Line 29 
29  /* create a field to render from the original volume data field */  /* create a field to render from the original volume data field */
30  field#2(3)[] F = V;  field#2(3)[] F = V;
31    
 /* create a 1-D field around the colormap */  
 field#0(1)[3] CM = tent ⊛ clamp(cmap);  
   
32  // (boilerplate) computing ray parameters and view-space basis  // (boilerplate) computing ray parameters and view-space basis
33  vec3 camN = normalize(camAt - camEye);  // N: away from eye  vec3 camN = normalize(camAt - camEye);  // N: away from eye
34  vec3 camU = normalize(camN × camUp);    // U: right  vec3 camU = normalize(camN × camUp);    // U: right
# Line 63  Line 59 
59     happens in world-space rather than ray sample index space.     happens in world-space rather than ray sample index space.
60     The actual distance between samples on this ray is |rayVec|*rayStep */     The actual distance between samples on this ray is |rayVec|*rayStep */
61     real alphaFix = |rayVec|*rayStep/refStep;     real alphaFix = |rayVec|*rayStep/refStep;
    vec3 eyeDir = -normalize(rayVec);  
62     // output for this ray     // output for this ray
63     output vec4 rgba = [0,0,0,0];     output vec4 rgba = [0,0,0,0];
64     // state for this ray is current color ...     // state for this ray is current color ...
# Line 72  Line 67 
67     real transp = 1;     real transp = 1;
68     /* example of turning on debuging for one strand (pixel);     /* example of turning on debuging for one strand (pixel);
69        can can then have "if (verb) { print(...); }" */        can can then have "if (verb) { print(...); }" */
70     bool verb = 54==ui && 54==vi;     bool verb = false; // 54==ui && 54==vi;
71     update {     update {
72        rayN += rayStep;          // increment ray position        rayN += rayStep;          // increment ray position
73        if (rayN > camFarVsp) {   // ray passed the far clipping plane        if (rayN > camFarVsp) {   // ray passed the far clipping plane
# Line 100  Line 95 
95        vec3 delta = (evec{1}⊗evec{1}/eval{1} + evec{2}⊗evec{2}/eval{2})•grad;        vec3 delta = (evec{1}⊗evec{1}/eval{1} + evec{2}⊗evec{2}/eval{2})•grad;
96        real aa = alpha(|delta|, 1) if eval{2} < -0.1 else 0;        real aa = alpha(|delta|, 1) if eval{2} < -0.1 else 0;
97    
   
98        if (verb) {        if (verb) {
99           print("               aa=", aa, "\n");           print("               aa=", aa, "\n");
100        }        }

Legend:
Removed from v.4817  
changed lines
  Added in v.4818

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