SCM Repository
[diderot] Diff of /branches/pure-cfg/test/zslice1.diderot
Diff of /branches/pure-cfg/test/zslice1.diderot
Parent Directory
|
Revision Log
|
Patch
11 |
|
|
12 |
strand RayCast (int row, int col) |
strand RayCast (int row, int col) |
13 |
{ |
{ |
14 |
real rr = real(dataSize)*(real(row)+0.5)/real(imgSize) - 0.5; |
real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5); |
15 |
real cc = real(dataSize)*(real(col)+0.5)/real(imgSize) - 0.5; |
real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5); |
16 |
vec3 pos = orig + rr*rVec + cc*cVec; |
vec3 pos = orig + rr*rVec + cc*cVec; |
17 |
output real maxval = -∞; |
output real val = -∞; |
18 |
|
|
19 |
update |
update |
20 |
{ |
{ |
|
// HEY region for this should be exactly centered in the image |
|
21 |
if (inside (pos,F)) { |
if (inside (pos,F)) { |
22 |
maxval = 1.0; |
val = 1.0; |
23 |
} |
} |
24 |
stabilize; |
stabilize; |
25 |
} |
} |
|
|
|
|
/* render: output maxval */ |
|
26 |
} |
} |
27 |
|
|
28 |
initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ]; |
initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ]; |
|
Legend:
Removed from v.769 |
|
changed lines |
|
Added in v.770 |
|
|