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

Comparing ray/src/common/color.h (file contents):
Revision 1.6 by greg, Tue Jan 9 10:57:30 1990 UTC vs.
Revision 1.7 by greg, Fri Dec 14 12:48:30 1990 UTC

# Line 40 | Line 40 | typedef float  COLOR[3];       /* red, green, blue */
40  
41   #define  multcolor(c1,c2)       ((c1)[0]*=(c2)[0],(c1)[1]*=(c2)[1],(c1)[2]*=(c2)[2])
42  
43 < #define  bright(col)            (.30*(col)[RED]+.59*(col)[GRN]+.11*(col)[BLU])
43 > #ifdef  NTSC
44 > #define  bright(col)            (.295*(col)[RED]+.636*(col)[GRN]+.070*(col)[BLU])
45 > #define  normbright(c)          (int)((74L*(c)[RED]+164L*(c)[GRN]+18L*(c)[BLU])/256)
46 > #else
47 > #define  bright(col)            (.263*(col)[RED]+.655*(col)[GRN]+.082*(col)[BLU])
48 > #define  normbright(c)          (int)((67L*(c)[RED]+168L*(c)[GRN]+21L*(c)[BLU])/256)
49 > #endif
50  
51   #define  intens(col)            ( (col)[0] > (col)[1] \
52                                  ? (col)[0] > (col)[2] ? (col)[0] : (col)[2] \
# Line 49 | Line 55 | typedef float  COLOR[3];       /* red, green, blue */
55   #define  colrval(c,p)           ( (c)[EXP] ? \
56                                  ldexp((c)[p]+.5,(int)(c)[EXP]-(COLXS+8)) : \
57                                  0. )
52
53 #define  normbright(c)          (int)((77L*(c)[RED]+151L*(c)[GRN]+28L*(c)[BLU])/256)
58  
59   #define  WHTCOLOR               {1.0,1.0,1.0}
60   #define  BLKCOLOR               {0.0,0.0,0.0}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines