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

Comparing ray/src/common/ccolor.c (file contents):
Revision 3.7 by greg, Thu Mar 26 15:57:19 2015 UTC vs.
Revision 3.8 by greg, Sun Apr 5 01:32:01 2015 UTC

# Line 96 | Line 96 | c_fromSharpRGB(float cin[3], C_COLOR *cout)
96   {
97          double  xyz[3], sf;
98  
99        xyz[0] = XYZfromSharp[0][0]*cin[0] + XYZfromSharp[0][1]*cin[1] +
100                                XYZfromSharp[0][2]*cin[2];
99          xyz[1] = XYZfromSharp[1][0]*cin[0] + XYZfromSharp[1][1]*cin[1] +
100                                  XYZfromSharp[1][2]*cin[2];
101 +        if (xyz[1] <= 1e-6) {
102 +                *cout = c_dfcolor;      /* punting, here... */
103 +                return xyz[1];
104 +        }
105 +        xyz[0] = XYZfromSharp[0][0]*cin[0] + XYZfromSharp[0][1]*cin[1] +
106 +                                XYZfromSharp[0][2]*cin[2];
107          xyz[2] = XYZfromSharp[2][0]*cin[0] + XYZfromSharp[2][1]*cin[1] +
108                                  XYZfromSharp[2][2]*cin[2];
109 <                                
109 >        
110          sf = 1./(xyz[0] + xyz[1] + xyz[2]);
111  
112          cout->cx = xyz[0] * sf;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines