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 886, Wed Apr 20 14:20:19 2011 UTC revision 887, Wed Apr 20 14:35:57 2011 UTC
# Line 1  Line 1 
1    // process output with:
2    // unu reshape -i mip.txt -s 4 200 200 | overrgb -i - -b 0.1 0.15 0.2 -o - | unu quantize -b 8 -min 0 -max 255  -o vr-kcomp.png
3    
4  vec3 camEye = [25.0, 10.0, 8.0];  vec3 camEye = [25.0, 10.0, 8.0];
5  vec3 camAt = [0.0, 0.0, 0.0];  vec3 camAt = [0.0, 0.0, 0.0];
6  vec3 camUp = [0.0, 0.0, 1.0];  vec3 camUp = [0.0, 0.0, 1.0];
# Line 36  Line 39 
39      real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5);      real rayU = lerp(-camUmax, camUmax, -0.5, real(ui), real(imgResU)-0.5);
40      real rayV = lerp(-camVmax, camVmax, -0.5, real(vi), real(imgResV)-0.5);      real rayV = lerp(-camVmax, camVmax, -0.5, real(vi), real(imgResV)-0.5);
41      vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist;      vec3 rayVec = (camDist*camN + rayU*camU + rayV*camV)/camDist;
     vec3 rayDir = normalize(rayVec);  
42    
43      real rayN = camVspNear;      real rayN = camVspNear;
44      // ########## BEGIN per-ray initialization      // ########## BEGIN per-ray initialization
# Line 44  Line 46 
46      real gray = 0.0;      real gray = 0.0;
47      int myui = ui;      int myui = ui;
48      int myvi = vi;      int myvi = vi;
     field#1(3)[] myFc0 = Fc0;  
     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 57 
57            real val = 0.0;            real val = 0.0;
58            vec3 norm = [0.0,0.0,0.0];            vec3 norm = [0.0,0.0,0.0];
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 conditional below "if (ui + vi < imgResU)"
61            if (myui + myvi < imgResU) {            if (myui + myvi < imgResU) {
62               val = myFc0@rayPos;               val = Fc0@rayPos;
63               norm = normalize(-∇myFc0@rayPos);               norm = normalize(-∇Fc0@rayPos);
64            } else {            } else {
65               val = myFc1@rayPos;               val = Fc1@rayPos;
66               norm = normalize(-∇myFc1@rayPos);               norm = normalize(-∇Fc1@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));

Legend:
Removed from v.886  
changed lines
  Added in v.887

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