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

Comparing ray/src/hd/rhdobj.c (file contents):
Revision 3.17 by greg, Tue Mar 30 20:40:04 2004 UTC vs.
Revision 3.20 by greg, Fri May 20 02:06:39 2011 UTC

# Line 34 | Line 34 | void   (*dobj_lightsamp)(COLR clr, FVECT direc, FVECT po
34   #define NALT            11              /* # sampling altitude angles */
35   #endif
36   #ifndef NAZI
37 < #define NAZI            ((int)(PI/2.*NALT+.5))
37 > #define NAZI            17
38   #endif
39  
40   typedef struct dlights {
# Line 320 | Line 320 | ssph_compute(void)                     /* compute source set from sphere
320                                                  /* avg. reflected brightness */
321          d = AVGREFL / (double)ncells;  
322          scalecolor(csum, d);
323 <        if (tmCvColors(&dlightsets->larb, TM_NOCHROM, &csum, 1) != TM_E_OK)
323 >        if (tmCvColors(tmGlobal, &dlightsets->larb,
324 >                        TM_NOCHROM, &csum, 1) != TM_E_OK)
325                  error(CONSISTENCY, "tone mapping problem in ssph_compute");
326                                          /* greedy light source clustering */
327          while (dlightsets->nl < MAXLIGHTS) {
# Line 953 | Line 954 | dobj_render(void)                      /* render our objects in OpenGL */
954                          continue;
955                                          /* set up lighting */
956                  if (op->drawcode == DO_LIGHT && op->ol != NULL) {
957 <                        BYTE    pval;
957 >                        uby8    pval;
958                          double  expval, d;
959                                                  /* use computed sources */
960 <                        if (tmMapPixels(&pval, &op->ol->larb, TM_NOCHROM, 1)
961 <                                        != TM_E_OK)
960 >                        if (tmMapPixels(tmGlobal, &pval, &op->ol->larb,
961 >                                        TM_NOCHROM, 1) != TM_E_OK)
962                                  error(CONSISTENCY, "dobj_render w/o tone map");
963                          expval = pval * (WHTEFFICACY/256.) /
964                                          tmLuminance(op->ol->larb);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines