--- ray/src/util/genBSDF.pl 2020/01/17 17:33:48 2.84 +++ ray/src/util/genBSDF.pl 2022/03/02 21:15:18 2.89 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genBSDF.pl,v 2.84 2020/01/17 17:33:48 greg Exp $ +# RCSid $Id: genBSDF.pl,v 2.89 2022/03/02 21:15:18 greg Exp $ # # Compute BSDF based on geometry and material description # @@ -213,6 +213,7 @@ if ( !defined $recovery ) { printf MGFSCN "xf -t %.6f %.6f 0\n", -($dim[0]+$dim[1])/2, -($dim[2]+$dim[3])/2; close MGFSCN; if ( $mgfin ) { + die "+mgf requires input file with +geom\n" if ($#ARGV < 0); system qq{mgfilt "#,o,xf,c,cxy,cspec,cmix,m,sides,rd,td,rs,ts,ir,v,p,n,f,fh,sph,cyl,cone,prism,ring,torus" @ARGV >> $mgfscn}; } else { system "rad2mgf $radscn >> $mgfscn"; @@ -436,7 +437,7 @@ sub ttree_comp { } } if ($pctcull >= 0) { - my $avg = ( $dorecip && "$typ" =~ /^r[fb]/ ) ? " -a" : ""; + my $avg = ( $dorecip && ( $tensortree == 3 || "$typ" =~ /^r[fb]/ ) ) ? " -a" : ""; my $pcull = ("$spec" eq "Visible") ? $pctcull : (100 - (100-$pctcull)*.25) ; if ($windoz) {