190 |
|
int i; |
191 |
|
|
192 |
|
/* PMAP: skip transmitted shadow ray if accounted for in photon map */ |
193 |
+ |
/* No longer needed? |
194 |
|
if (shadowRayInPmap(r) || ambRayInPmap(r)) |
195 |
< |
return(1); |
195 |
> |
return(1); */ |
196 |
> |
|
197 |
|
/* easy shadow test */ |
198 |
|
if (r->crtype & SHADOW && m->otype != MAT_TRANS) |
199 |
|
return(1); |
331 |
|
/* diffuse reflection */ |
332 |
|
nd.rdiff = 1.0 - nd.trans - nd.rspec; |
333 |
|
|
334 |
< |
if (nd.specfl & SP_PURE && nd.rdiff <= FTINY && nd.tdiff <= FTINY) |
334 |
> |
if (nd.specfl & SP_PURE && nd.rdiff <= FTINY && nd.tdiff <= FTINY) { |
335 |
> |
if (mirtest > transtest+FTINY) |
336 |
> |
r->rt = mirdist; |
337 |
> |
else if (transtest > FTINY) |
338 |
> |
r->rt = transdist; |
339 |
|
return(1); /* 100% pure specular */ |
340 |
< |
|
340 |
> |
} |
341 |
|
if (!(nd.specfl & SP_PURE)) |
342 |
|
gaussamp(&nd); /* checks *BLT flags */ |
343 |
|
|