110 |
|
my $view = `@vwrightA 0`; |
111 |
|
my @res = split(/\s/, `@vwraysA -d`); |
112 |
|
if (defined $outzbf) { # generating depth buffer? |
113 |
< |
my $tres = "/tmp/rtp$$"; |
114 |
< |
system "@vwraysA | @rtraceA -fff -ovl $res[4] $oct > $tres" || exit 1; |
115 |
< |
system( q{getinfo -c rcalc -if4 -of -e '$1=$1;$2=$2;$3=$3' < } . |
116 |
< |
"$tres | pvalue -r -df -Y $res[3] +X $res[1] | " . |
117 |
< |
"getinfo -a 'VIEW=$view'" ); |
118 |
< |
system( "getinfo - < $tres | rcalc -if4 -of > $outzbf" . q{ -e '$1=$4'} ); |
119 |
< |
unlink $tres; |
120 |
< |
exit; |
113 |
> |
exec "@vwraysA | @rtraceA -fff -olv @res $oct | " . |
114 |
> |
"rsplit -ih -iH -f " . |
115 |
> |
"-of $outzbf " . |
116 |
> |
"-oh -oH -of3 '!pvalue -r -df' | " . |
117 |
> |
"getinfo -a 'VIEW=$view'"; |
118 |
|
} |
119 |
|
# no depth buffer, so simpler |
120 |
|
exec "@vwraysA | @rtraceA -ffc @res $oct | getinfo -a 'VIEW=$view'"; |