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

SCM Repository

[diderot] View of /tests/vis15-bugs/dvrbug3.diderot
ViewVC logotype

View of /tests/vis15-bugs/dvrbug3.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5041 - (download) (annotate)
Wed Jul 12 14:36:36 2017 UTC (2 years ago) by jhr
File size: 611 byte(s)
minor edit
// stripped down version of dvrbug2.diderot
//

input int iresU ("# samples on horizontal axis of image") = 640;
input int iresV ("# samples on vertical axis of image") = 480;

strand raycast () {
  output vec4 rgba = [0,0,0,0];
  vec3 rgb = [0,0,0];
  real transp = 1;
  real maxval = -∞;
  update {
    stabilize;
  }
  stabilize {
      if (transp < 1) {
         real aa = 1-transp;
         rgba = [rgb[0]/aa, rgb[1]/aa, rgb[2]/aa, aa];
      }
      rgba = [maxval, maxval, maxval, 1];
  }
}

initially [ raycast()
            | vi in 0..iresV-1,   // slower
              ui in 0..iresU-1 ]; // faster

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