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

Comparing ray/src/rt/m_mist.c (file contents):
Revision 2.4 by greg, Sun Dec 17 11:51:47 1995 UTC vs.
Revision 2.5 by greg, Thu Mar 21 10:24:59 1996 UTC

# Line 36 | Line 36 | static char SCCSid[] = "$SunId$ LBL";
36   *      [ext_r  ext_g  ext_b  [albedo [gecc]]]
37   *
38   *  The primaries indicate medium extinction per unit length (absorption
39 < *  plus scattering).  The albedo is the ratio of scattering to extinction,
39 > *  plus scattering), which is added to the global extinction coefficient, set
40 > *  by the -me option.  The albedo is the ratio of scattering to extinction,
41   *  and is set globally by the -ma option (salbedo) and overridden here.
42   *  The Heyney-Greenstein eccentricity parameter (-mg seccg) indicates how much
43   *  scattering favors the forward direction.  A value of 0 means isotropic
# Line 188 | Line 189 | register RAY  *r;
189                          }
190                          p.slights[0] = i;
191                  }
192 <                re = colval(r->cext,RED) - colval(mext,RED);
193 <                ge = colval(r->cext,GRN) - colval(mext,GRN);
194 <                be = colval(r->cext,BLU) - colval(mext,BLU);
195 <                setcolor(p.cext, re<0. ? 0. : re,
196 <                                ge<0. ? 0. : ge,
197 <                                be<0. ? 0. : be);
192 >                if ((re = colval(r->cext,RED) - colval(mext,RED)) <
193 >                                colval(cextinction,RED))
194 >                        re = colval(cextinction,RED);
195 >                if ((ge = colval(r->cext,GRN) - colval(mext,GRN)) <
196 >                                colval(cextinction,GRN))
197 >                        ge = colval(cextinction,GRN);
198 >                if ((be = colval(r->cext,BLU) - colval(mext,BLU)) <
199 >                                colval(cextinction,BLU))
200 >                        be = colval(cextinction,BLU);
201 >                setcolor(p.cext, re, ge, be);
202                  if (m->oargs.nfargs > 3)
203                          p.albedo = salbedo;
204                  if (m->oargs.nfargs > 4)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines