112 |
|
scalecolor(ctmp, dtmp); |
113 |
|
addcolor(cval, ctmp); |
114 |
|
} |
115 |
< |
|
115 |
> |
|
116 |
|
if (ldot < -FTINY && ltdiff > FTINY) { |
117 |
|
/* |
118 |
|
* Compute diffuse transmission. |
122 |
|
scalecolor(ctmp, dtmp); |
123 |
|
addcolor(cval, ctmp); |
124 |
|
} |
125 |
< |
|
125 |
> |
|
126 |
> |
if (ambRayInPmap(np->rp)) |
127 |
> |
return; /* specular already in photon map */ |
128 |
> |
|
129 |
|
if (ldot > FTINY && (np->specfl&(SP_REFL|SP_PURE)) == SP_REFL) { |
130 |
|
/* |
131 |
|
* Compute specular reflection coefficient using |
190 |
|
int i; |
191 |
|
|
192 |
|
/* PMAP: skip transmitted shadow ray if accounted for in photon map */ |
193 |
< |
if (shadowRayInPmap(r)) |
193 |
> |
if (shadowRayInPmap(r) || ambRayInPmap(r)) |
194 |
|
return(1); |
195 |
|
/* easy shadow test */ |
196 |
|
if (r->crtype & SHADOW && m->otype != MAT_TRANS) |