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

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.100 by greg, Tue Jul 2 23:54:16 2024 UTC vs.
Revision 2.103 by greg, Mon Aug 12 18:57:00 2024 UTC

# Line 384 | Line 384 | render(                                /* render the scene */
384          char  *oldfile
385   )
386   {
387 +        const int  srcdrawing =         /* manually draw tiny light sources? */
388 +                (directvis && dblur <= FTINY && (mblur <= FTINY) | !lastview.type);
389          COLOR  *scanbar[MAXDIV+1];      /* scanline arrays of pixel values */
390          float  *zbar[MAXDIV+1];         /* z values */
391          char  *sampdens;                /* previous sample density */
# Line 450 | Line 452 | render(                                /* render the scene */
452          signal(SIGCONT, report);
453   #endif
454          ypos = vres-1 - i;                      /* initialize sampling */
455 <        if (directvis)
455 >        if (srcdrawing)
456                  init_drawsources(psample);
457          fillscanline(scanbar[0], zbar[0], sampdens, hres, ypos, hstep);
458                                                  /* compute scanlines */
# Line 471 | Line 473 | render(                                /* render the scene */
473                                  hres, ypos, hstep);
474                                                          /* fill bar */
475                  fillscanbar(scanbar, zbar, hres, ypos, ystep);
476 <                if (directvis)                          /* add bitty sources */
477 <                        drawsources((COLORV **)scanbar, zbar, 0, hres, ypos, ystep);
476 >                if (srcdrawing)                         /* add bitty sources */
477 >                        drawsources((COLORV **)scanbar, 3, zbar, 0, hres, ypos, ystep);
478                                                          /* write it out */
479   #ifdef SIGCONT
480                  signal(SIGCONT, SIG_IGN);       /* don't interrupt writes */
# Line 666 | Line 668 | pixvalue(              /* compute pixel value */
668          int  y
669   )
670   {
669        static COLORMAT xyz2myrgbmat;
671          RAY  thisray;
672          FVECT   lorg, ldir;
673          double  hpos, vpos, lmax;
# Line 700 | Line 701 | pixvalue(              /* compute pixel value */
701          rayorigin(&thisray, PRIMARY, NULL, NULL);
702  
703          rayvalue(&thisray);                     /* trace ray */
704 <
705 <        if (out_prims == stdprims) {            /* return color */
705 <                scolor_rgb(col, thisray.rcol);
706 <        } else if (out_prims == xyzprims) {
707 <                scolor_cie(col, thisray.rcol);
708 <                scalecolor(col, WHTEFFICACY);
709 <        } else if (NCSAMP > 3) {
710 <                COLOR   xyz;
711 <                if (xyz2myrgbmat[0][0] == 0)
712 <                        compxyz2rgbWBmat(xyz2myrgbmat, out_prims);
713 <                scolor_cie(xyz, thisray.rcol);
714 <                colortrans(col, xyz2myrgbmat, xyz);
715 <                clipgamut(col, xyz[CIEY], CGAMUT_LOWER, cblack, cwhite);
716 <        } else
717 <                copycolor(col, thisray.rcol);
704 >                                                /* -> color */
705 >        scolor_out(col, out_prims, thisray.rcol);
706  
707          return(raydistance(&thisray));          /* return distance */
708   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines