--- ray/src/rt/raytrace.c 2003/03/04 19:02:22 2.36 +++ ray/src/rt/raytrace.c 2003/06/26 00:58:10 2.40 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: raytrace.c,v 2.36 2003/03/04 19:02:22 greg Exp $"; +static const char RCSid[] = "$Id: raytrace.c,v 2.40 2003/06/26 00:58:10 schorsch Exp $"; #endif /* * raytrace.c - routines for tracing and shading rays. @@ -20,7 +20,7 @@ static const char RCSid[] = "$Id: raytrace.c,v 2.36 20 unsigned long raynum = 0; /* next unique ray number */ unsigned long nrays = 0; /* number of calls to localhit */ -static FLOAT Lambfa[5] = {PI, PI, PI, 0.0, 0.0}; +static RREAL Lambfa[5] = {PI, PI, PI, 0.0, 0.0}; OBJREC Lamb = { OVOID, MAT_PLASTIC, "Lambertian", {0, 5, NULL, Lambfa}, NULL, @@ -101,6 +101,7 @@ register RAY *r; r->rox = NULL; r->rt = r->rot = FHUGE; r->pert[0] = r->pert[1] = r->pert[2] = 0.0; + r->uv[0] = r->uv[1] = 0.0; setcolor(r->pcol, 1.0, 1.0, 1.0); setcolor(r->rcol, 0.0, 0.0, 0.0); } @@ -173,7 +174,8 @@ int mod; } ******/ /* hack for irradiance calculation */ - if (do_irrad && !(r->crtype & ~(PRIMARY|TRANS))) { + if (do_irrad && !(r->crtype & ~(PRIMARY|TRANS)) && + (ofun[m->otype].flags & (T_M|T_X))) { if (irr_ignore(m->otype)) { #if MAXLOOP depth--; @@ -226,9 +228,10 @@ register RAY *r; } +void raytexture(r, mod) /* get material modifiers */ RAY *r; -int mod; +OBJECT mod; { register OBJREC *m; #if MAXLOOP