| 1 |
< |
/* Copyright (c) 1995 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1996 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 197 |
|
if ((dist = r->rot) >= FHUGE) |
| 198 |
|
dist = 2.*thescene.cusize; /* what to use for infinity? */ |
| 199 |
|
if (r->crtype & SHADOW) |
| 200 |
< |
dist *= 1. - salbedo; /* no scattering for sources */ |
| 200 |
> |
dist *= 1. - r->albedo; /* no scattering for sources */ |
| 201 |
|
if (dist <= FTINY) |
| 202 |
|
return; /* no effective ray travel */ |
| 203 |
|
re = dist*colval(r->cext,RED); |
| 209 |
|
multcolor(r->rcol, ce); /* path absorption */ |
| 210 |
|
if (r->albedo <= FTINY || r->crtype & SHADOW) |
| 211 |
|
return; /* no scattering */ |
| 212 |
< |
setcolor(ca, salbedo*colval(ambval,RED)*(1.-colval(ce,RED)), |
| 213 |
< |
salbedo*colval(ambval,GRN)*(1.-colval(ce,GRN)), |
| 214 |
< |
salbedo*colval(ambval,BLU)*(1.-colval(ce,BLU))); |
| 212 |
> |
setcolor(ca, r->albedo*colval(ambval,RED)*(1.-colval(ce,RED)), |
| 213 |
> |
r->albedo*colval(ambval,GRN)*(1.-colval(ce,GRN)), |
| 214 |
> |
r->albedo*colval(ambval,BLU)*(1.-colval(ce,BLU))); |
| 215 |
|
addcolor(r->rcol, ca); /* ambient in scattering */ |
| 216 |
|
srcscatter(r); /* source in scattering */ |
| 217 |
|
} |