ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rxtrace.cpp
(Generate patch)

Comparing ray/src/rt/rxtrace.cpp (file contents):
Revision 2.7 by greg, Tue Nov 19 16:29:44 2024 UTC vs.
Revision 2.9 by greg, Thu Jan 2 02:59:15 2025 UTC

# Line 71 | Line 71 | static RayReportCall ourtrace;
71  
72   RayReportCall printvals;                /* print selected ray values */
73  
74 < void  putscolor(COLORV *scol);          /* convert/print spectral color */
74 > void  putscolor(COLORV *scol, double sf = 1.);          /* convert/print spectral color */
75  
76   static oputf_t *ray_out[32], *every_out[32];
77  
# Line 85 | Line 85 | quit(                  /* quit program */
85          if (ray_pnprocs < 0)
86                  _exit(code);            /* avoid flush in child */
87  
88 <        int     ec = myRTmanager.Cleanup();
88 >        if (ray_pnprocs > 1)
89 >                myRTmanager.SetThreadCount(1);
90  
90        if (ec) code = ec;
91
91          exit(code);
92   }
93  
# Line 511 | Line 510 | oputr(                         /* print mirrored contribution */
510          RAY  *r
511   )
512   {
513 <        putscolor(r->mcol);
513 >        putscolor(r->mcol, out_scalefactor);
514   }
515  
516   static void
# Line 532 | Line 531 | oputx(                         /* print unmirrored contribution */
531          copyscolor(cdiff, r->rcol);
532          sopscolor(cdiff, -=, r->mcol);
533  
534 <        putscolor(cdiff);
534 >        putscolor(cdiff, out_scalefactor);
535   }
536  
537   static void
# Line 548 | Line 547 | oputv(                         /* print value */
547          RAY  *r
548   )
549   {
550 <        putscolor(r->rcol);
550 >        putscolor(r->rcol, out_scalefactor);
551   }
552  
553   static void
# Line 560 | Line 559 | oputV(                         /* print value contribution */
559  
560          raycontrib(contr, r, PRIMARY);
561          smultscolor(contr, r->rcol);
562 <        putscolor(contr);
562 >        putscolor(contr, out_scalefactor);
563   }
564  
565   static void
# Line 769 | Line 768 | putrgbe(RREAL *v, int n)       /* output RGBE color */
768   }
769  
770   void
771 < putscolor(COLORV *scol)         /* output (spectral) color */
771 > putscolor(COLORV *scol, double sf)              /* output (spectral) color */
772   {
773          static COLORMAT xyz2myrgbmat;
774          SCOLOR          my_scol;
775          COLOR           col;
776                                          /* single channel output? */
777          if (sens_curve != NULL) {
778 <                RREAL   v = (*sens_curve)(scol) * out_scalefactor;
778 >                RREAL   v = (*sens_curve)(scol) * sf;
779                  (*putreal)(&v, 1);
780                  return;
781          }
782 <        if (out_scalefactor != 1.) {    /* apply scalefactor if any */
782 >        if (sf != 1.) {                 /* apply scalefactor if any */
783                  copyscolor(my_scol, scol);
784 <                scalescolor(my_scol, out_scalefactor);
784 >                scalescolor(my_scol, sf);
785                  scol = my_scol;
786          }
787          if (out_prims == NULL) {        /* full spectral reporting */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines