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

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.110 by greg, Mon Dec 11 18:33:53 2023 UTC vs.
Revision 2.112 by greg, Sat Jan 6 01:21:34 2024 UTC

# Line 684 | Line 684 | oputr(                         /* print mirrored contribution */
684          RAY  *r
685   )
686   {
687 <        RREAL   cval[3];
688 <
689 <        cval[0] = colval(r->mcol,RED);
690 <        cval[1] = colval(r->mcol,GRN);
691 <        cval[2] = colval(r->mcol,BLU);
692 <        (*putreal)(cval, 3);
687 >        putscolor(r->mcol);
688   }
689  
690  
# Line 964 | Line 959 | putscolor(COLORV *scol)                /* output (spectral) color */
959          static COLORMAT xyz2myrgbmat;
960          SCOLOR          my_scol;
961          COLOR           col;
962 <                                        /* apply scalefactor if any */
963 <        if (out_scalefactor != 1.) {
962 >                                        /* single channel output? */
963 >        if (sens_curve != NULL) {
964 >                RREAL   v = (*sens_curve)(scol) * out_scalefactor;
965 >                (*putreal)(&v, 1);
966 >                return;
967 >        }
968 >        if (out_scalefactor != 1.) {    /* apply scalefactor if any */
969                  copyscolor(my_scol, scol);
970                  scalescolor(my_scol, out_scalefactor);
971                  scol = my_scol;
972        }
973        if (sens_curve != NULL) {       /* single channel output */
974                RREAL   v = (*sens_curve)(scol);
975                (*putreal)(&v, 1);
976                return;
972          }
973          if (out_prims == NULL) {        /* full spectral reporting */
974                  if (outform == 'c') {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines