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

SCM Repository

[diderot] Diff of /branches/charisee/test/vr-lite-cam.diderot
ViewVC logotype

Diff of /branches/charisee/test/vr-lite-cam.diderot

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

revision 1383, Thu Jun 23 20:24:04 2011 UTC revision 1640, Wed Nov 16 02:19:51 2011 UTC
# Line 6  Line 6 
6  // The main thing missing from this is a more general transfer function  // The main thing missing from this is a more general transfer function
7  //  //
8  // process output with:  // process output with:
9  // unu reshape -i mip.txt -s 4 480 345 | overrgb -i - -b 0.1 0.15 0.2 -g 1.2 -o - | unu quantize -b 8 -min 0 -max 255  -o vr-lite-cam.png  // unu reshape -i vr-lite-cam.txt -s 4 480 345 | overrgb -i - -b 0.1 0.15 0.2 -g 1.2 -o - | unu quantize -b 8 -min 0 -max 255  -o vr-lite-cam.png
10    
11  //string dataFile = "../data/txs-pad3.nrrd";  //string dataFile = "../data/txs-pad3.nrrd";
12  //vec3 camEye = [25.0, 15.0, 10.0];  //vec3 camEye = [25.0, 15.0, 10.0];
# Line 93  Line 93 
93  //                             + phongKd*ld*modulate(matRGB, lightRGB)  //                             + phongKd*ld*modulate(matRGB, lightRGB)
94  //                             + phongKs*hd^phongSp*lightRGB);  //                             + phongKs*hd^phongSp*lightRGB);
95  //              rayRGB += rayTransp*alpha*pntRGB;  //              rayRGB += rayTransp*alpha*pntRGB;
96                  real mat = lerp(0.2, 1.0, 1.0, rayPos[0], 8.0);  //              real mat = lerp(0.2, 1.0, 1.0, rayPos[0], 8.0);
97                  real pnt = phongKa * mat                  real pnt = phongKa
98                           + phongKd * ld * mat                           + phongKd * ld
99                           + phongKs * hd^phongSp;                           + phongKs * hd^phongSp;
100                  rayGrey += rayTransp*alpha*pnt;                  rayGrey += rayTransp*alpha*pnt;
101                  rayTransp = rayTransp*(1.0 - alpha);                  rayTransp = rayTransp*(1.0 - alpha);
# Line 104  Line 104 
104         }         }
105         if (rayTransp < 0.01) {  // early ray termination         if (rayTransp < 0.01) {  // early ray termination
106             rayTransp = 0.0;             rayTransp = 0.0;
 //           outRGBA = [rayRGB[0], rayRGB[1], rayRGB[2], 1.0-rayTransp]; /* FIXME */  
            outRGBA = [rayGrey, rayGrey, rayGrey, 1.0-rayTransp]; /* FIXME */  
107             stabilize;             stabilize;
108         }         }
109         if (rayN > camVspFar) {         if (rayN > camVspFar) {
 //           outRGBA = [rayRGB[0], rayRGB[1], rayRGB[2], 1.0-rayTransp]; /* FIXME */  
            outRGBA = [rayGrey, rayGrey, rayGrey, 1.0-rayTransp]; /* FIXME */  
110             stabilize;             stabilize;
111         }         }
112         rayN += rayStep;         rayN += rayStep;
113      }      }
114    
115      stabilize {      stabilize {
116  //     outRGBA = [rayRGB[0], rayRGB[1], rayRGB[2], 1.0-rayTransp];          outRGBA = [rayGrey, rayGrey, rayGrey, 1.0-rayTransp];
117      }      }
118    
119  }  }

Legend:
Removed from v.1383  
changed lines
  Added in v.1640

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