189 |
|
register RAY *r; |
190 |
|
{ |
191 |
|
COLOR ce, ca; |
192 |
– |
double dist; |
192 |
|
double re, ge, be; |
193 |
|
|
194 |
|
if (intens(r->cext) <= 1./FHUGE) |
195 |
|
return; /* no medium */ |
196 |
< |
if ((dist = r->rot) >= FHUGE) |
197 |
< |
dist = 2.*thescene.cusize; /* what to use for infinity? */ |
198 |
< |
re = dist*colval(r->cext,RED); |
200 |
< |
ge = dist*colval(r->cext,GRN); |
201 |
< |
be = dist*colval(r->cext,BLU); |
196 |
> |
re = r->rot*colval(r->cext,RED); |
197 |
> |
ge = r->rot*colval(r->cext,GRN); |
198 |
> |
be = r->rot*colval(r->cext,BLU); |
199 |
|
if (r->crtype & SHADOW) { /* no scattering for sources */ |
200 |
|
re *= 1. - colval(r->albedo,RED); |
201 |
|
ge *= 1. - colval(r->albedo,GRN); |