ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/genBSDF.pl
(Generate patch)

Comparing ray/src/util/genBSDF.pl (file contents):
Revision 2.27 by greg, Thu Oct 27 16:35:54 2011 UTC vs.
Revision 2.28 by greg, Mon Nov 21 20:07:50 2011 UTC

# Line 338 | Line 338 | print
338   system "rcalc -if3 -e 'Omega:PI/($ns*$ns)' " .
339          q{-e '$1=(0.265*$1+0.670*$2+0.065*$3)/Omega' -of } .
340          "$td/" . ($bmodnm,$fmodnm)[$forw] . "_???.flt " .
341 <        "| rttree_reduce -h -ff -t $pctcull -r $tensortree -g $ttlog2";
341 >        "| rttree_reduce -a -h -ff -t $pctcull -r $tensortree -g $ttlog2";
342   die "Failure running rttree_reduce" if ( $? );
343   print
344   '                       </ScatteringData>
# Line 364 | Line 364 | print
364   system "rcalc -if3 -e 'Omega:PI/($ns*$ns)' " .
365          q{-e '$1=(0.265*$1+0.670*$2+0.065*$3)/Omega' -of } .
366          "$td/" . ($fmodnm,$bmodnm)[$forw] . "_???.flt " .
367 <        "| rttree_reduce -h -ff -t $pctcull -r $tensortree -g $ttlog2";
367 >        "| rttree_reduce -a -h -ff -t $pctcull -r $tensortree -g $ttlog2";
368   die "Failure running rttree_reduce" if ( $? );
369   print
370   '                       </ScatteringData>
# Line 585 | Line 585 | print
585                          <ScatteringDataType>BRDF</ScatteringDataType>
586                          <ScatteringData>
587   ';
588 < # Output front reflection (transposed order)
588 > # Output front reflection (reciprocity averaging)
589   for (my $od = 0; $od < $ndiv; $od++) {
590          for (my $id = 0; $id < $ndiv; $id++) {
591 <                print $rfarr[$ndiv*$id + $od];
591 >                print .5*($rfarr[$ndiv*$id + $od] + $rfarr[$ndiv*$od + $id]);
592          }
593          print "\n";
594   }
# Line 635 | Line 635 | print
635                          <ScatteringDataType>BRDF</ScatteringDataType>
636                          <ScatteringData>
637   ';
638 < # Output back reflection (transposed order)
638 > # Output back reflection (reciprocity averaging)
639   for (my $od = 0; $od < $ndiv; $od++) {
640          for (my $id = 0; $id < $ndiv; $id++) {
641 <                print $rbarr[$ndiv*$id + $od];
641 >                print .5*($rbarr[$ndiv*$id + $od] + $rbarr[$ndiv*$od + $id]);
642          }
643          print "\n";
644   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines