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

Comparing ray/src/util/rmtxop.c (file contents):
Revision 2.23 by greg, Tue Nov 28 16:36:50 2023 UTC vs.
Revision 2.24 by greg, Wed Nov 29 18:56:28 2023 UTC

# Line 92 | Line 92 | sensrow(ROPMAT *rop, int r, double (*sf)(SCOLOR sc, in
92          for (i = nc; i--; ) {
93                  SCOLOR  sclr;
94                  scolorblack(sclr);
95 <                sclr[i] = 1;
95 >                sclr[i] = 1.f;
96                  rop->preop.cmat[r*nc+i] = (*sf)(sclr, nc, rop->mtx->wlpart);
97          }
98   }
# Line 156 | Line 156 | checksymbolic(ROPMAT *rop)
156                          for (i = nc*(dt != DTxyze); i--; )
157                                  rop->preop.cmat[j*nc+i] *= WHTEFFICACY;
158                          break;
159 <                case 'S':
159 >                case 'S':               /* scotopic (il)luminance */
160                          sensrow(rop, j, scolor2scotopic);
161                          for (i = nc; i--; )
162                                  rop->preop.cmat[j*nc+i] *= WHTSCOTOPIC;
163                          break;
164 <                case 'M':
164 >                case 'M':               /* melanopic (il)luminance */
165                          sensrow(rop, j, scolor2melanopic);
166                          for (i = nc; i--; )
167                                  rop->preop.cmat[j*nc+i] *= WHTMELANOPIC;
168 +                        break;
169 +                case 'A':               /* average component */
170 +                        for (i = nc; i--; )
171 +                                rop->preop->cmat[j*nc+i] = 1./(double)nc;
172                          break;
173                  default:
174                          fprintf(stderr, "%s: -c '%c' unsupported\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines