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

Comparing ray/src/common/spec_rgb.c (file contents):
Revision 2.15 by greg, Tue Sep 5 21:54:32 2006 UTC vs.
Revision 2.19 by greg, Fri Nov 20 17:51:47 2009 UTC

# Line 244 | Line 244 | RGBPRIMS  pr
244          int     i;
245          
246          for (i = 0; i < 4; i++) {
247 <                if ((pr[i][CIEX] <= CEPS) | (pr[i][CIEY] <= CEPS))
247 >                if ((pr[i][CIEX] <= -.5) | (pr[i][CIEY] <= -.5))
248                          return(0);
249 <                if ((pr[i][CIEX] >= 1.-CEPS) | (pr[i][CIEY] >= 1.-CEPS))
249 >                if ((pr[i][CIEX] >= 1.5) | (pr[i][CIEY] >= 1.5))
250                          return(0);
251 +                if (pr[i][CIEX] + pr[i][CIEY] >= 1.5)
252 +                        return(0);
253          }
254          return(1);
255   }
# Line 264 | Line 266 | register RGBPRIMS  pr
266  
267          if (pr == stdprims) {   /* can use xyz2rgbmat */
268                  cpcolormat(mat, xyz2rgbmat);
269 <                return;
269 >                return(1);
270          }
271          if (CEQ(pr[WHT][CIEX],0.) | CEQ(pr[WHT][CIEY],0.))
272                  return(0);
# Line 324 | Line 326 | register RGBPRIMS  pr
326  
327          if (pr == stdprims) {   /* can use rgb2xyzmat */
328                  cpcolormat(mat, rgb2xyzmat);
329 <                return;
329 >                return(1);
330          }
331          if (CEQ(pr[WHT][CIEX],0.) | CEQ(pr[WHT][CIEY],0.))
332                  return(0);
# Line 371 | Line 373 | RGBPRIMS  pr2
373                  mat[0][0] = mat[1][1] = mat[2][2] = 1.0;
374                  mat[0][1] = mat[0][2] = mat[1][0] =
375                  mat[1][2] = mat[2][0] = mat[2][1] = 0.0;
376 <                return;
376 >                return(1);
377          }
378          if (!comprgb2xyzmat(pr1toxyz, pr1))
379                  return(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines