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

Comparing ray/src/rt/aniso.c (file contents):
Revision 2.13 by greg, Mon Apr 20 09:25:47 1992 UTC vs.
Revision 2.14 by greg, Wed Apr 22 09:05:27 1992 UTC

# Line 34 | Line 34 | extern double  specjitter;             /* specular sampling jitte
34   *  8  red      grn     blu     rspec   u-rough v-rough trans   tspec
35   */
36  
37 + #define  BSPEC(m)       (6.0)           /* specularity parameter b */
38 +
39                                  /* specularity flags */
40   #define  SP_REFL        01              /* has reflected specular component */
41   #define  SP_TRAN        02              /* has transmitted specular */
# Line 196 | Line 198 | register RAY  *r;
198                  else
199                          setcolor(nd.scolor, 1.0, 1.0, 1.0);
200                  scalecolor(nd.scolor, nd.rspec);
201 +                                                /* improved model */
202 +                dtmp = exp(-BSPEC(m)*nd.pdot);
203 +                for (i = 0; i < 3; i++)
204 +                        colval(nd.scolor,i) += (1.0-colval(nd.scolor,i))*dtmp;
205 +                nd.rspec += (1.0-nd.rspec)*dtmp;
206                                                  /* check threshold */
207                  if (specthresh > FTINY &&
208                                  (specthresh >= 1.-FTINY ||

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines