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

SCM Repository

[diderot] Diff of /trunk/test/vr-lite.diderot
ViewVC logotype

Diff of /trunk/test/vr-lite.diderot

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

revision 309, Tue Aug 17 18:35:35 2010 UTC revision 315, Tue Aug 17 22:03:44 2010 UTC
# Line 41  Line 41 
41                  } else {                  } else {
42                     opac = (val - valOpacMin)/(valOpacMax - valOpacMin);                     opac = (val - valOpacMin)/(valOpacMax - valOpacMin);
43                  }                  }
44                  gray = gray + transp*opac*max(0, dot(-dir,norm));                  gray = gray + transp*opac*max(0.0, dot(-dir,norm));
45                  transp = transp*(1.0 - opac);                  transp = transp*(1.0 - opac);
46              }              }
47          }          }
48          if (transp < 0.01) {  // early ray termination          if (transp < 0.01) {  // early ray termination
49              transp = 0.0;              transp = 0.0;
             rgba[0] = gray; rgba[1] = gray; rgba[2] = gray;  
             rgba[3] = 1.0-transp;  
50              stabilize;              stabilize;
51          }          }
52          if (t > 40.0) {          if (t > 40.0) {
             // do we have a stabilize() code block?  
             rgba[0] = gray; rgba[1] = gray; rgba[2] = gray;  
             rgba[3] = 1.0-transp;  
53              stabilize;              stabilize;
54          }          }
55          t = t + stepSz;          t = t + stepSz;
56      }      }
57    
58         stabilize {
59            rgba = [gray, gray, gray, 1.0-transp];
60            stabilize;
61         }
62    
63      /* render: output rgba */      /* render: output rgba */
64  }  }
65    

Legend:
Removed from v.309  
changed lines
  Added in v.315

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