| 20 |
|
#include "ray.h" |
| 21 |
|
#include "ambient.h" |
| 22 |
|
#include "random.h" |
| 23 |
+ |
#include "source.h" |
| 24 |
+ |
#include "otypes.h" |
| 25 |
+ |
#include "otspecial.h" |
| 26 |
|
|
| 27 |
|
#ifndef OLDAMB |
| 28 |
|
|
| 649 |
|
FVECT vec; |
| 650 |
|
double u, v; |
| 651 |
|
double ang, a1; |
| 652 |
+ |
OBJREC *m; |
| 653 |
|
int i, j; |
| 654 |
|
/* don't bother for a few samples */ |
| 655 |
|
if (hp->ns < 8) |
| 679 |
|
flgs |= 1L<<(int)(16/PI*(a1 + 2.*PI*(a1 < 0))); |
| 680 |
|
} |
| 681 |
|
/* add low-angle incident (< 20deg) */ |
| 682 |
< |
if (fabs(hp->rp->rod) <= 0.342) { |
| 682 |
> |
if (fabs(hp->rp->rod) <= 0.342 && hp->rp->parent != NULL && |
| 683 |
> |
(m = findmaterial(hp->rp->parent->ro)) != NULL && |
| 684 |
> |
isopaque(m->otype)) { |
| 685 |
|
u = -DOT(hp->rp->rdir, uv[0]); |
| 686 |
|
v = -DOT(hp->rp->rdir, uv[1]); |
| 687 |
|
if ((r0*r0*u*u + r1*r1*v*v) > hp->rp->rot*hp->rp->rot) { |