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 |
|
|
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 |
|
|
510 |
|
RAY *r |
511 |
|
) |
512 |
|
{ |
513 |
< |
putscolor(r->mcol); |
513 |
> |
putscolor(r->mcol, out_scalefactor); |
514 |
|
} |
515 |
|
|
516 |
|
static void |
531 |
|
copyscolor(cdiff, r->rcol); |
532 |
|
sopscolor(cdiff, -=, r->mcol); |
533 |
|
|
534 |
< |
putscolor(cdiff); |
534 |
> |
putscolor(cdiff, out_scalefactor); |
535 |
|
} |
536 |
|
|
537 |
|
static void |
547 |
|
RAY *r |
548 |
|
) |
549 |
|
{ |
550 |
< |
putscolor(r->rcol); |
550 |
> |
putscolor(r->rcol, out_scalefactor); |
551 |
|
} |
552 |
|
|
553 |
|
static void |
559 |
|
|
560 |
|
raycontrib(contr, r, PRIMARY); |
561 |
|
smultscolor(contr, r->rcol); |
562 |
< |
putscolor(contr); |
562 |
> |
putscolor(contr, out_scalefactor); |
563 |
|
} |
564 |
|
|
565 |
|
static void |
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 */ |