--- ray/src/rt/rtrace.c 2011/04/06 00:14:26 2.65 +++ ray/src/rt/rtrace.c 2012/06/27 15:32:58 2.67 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rtrace.c,v 2.65 2011/04/06 00:14:26 greg Exp $"; +static const char RCSid[] = "$Id: rtrace.c,v 2.67 2012/06/27 15:32:58 greg Exp $"; #endif /* * rtrace.c - program and variables for individual ray tracing. @@ -114,7 +114,7 @@ rtrace( /* trace rays from file */ ) { unsigned long vcount = (hresolu > 1) ? (unsigned long)hresolu*vresolu - : vresolu; + : (unsigned long)vresolu; long nextflush = (vresolu > 0) & (hresolu > 1) ? 0 : hresolu; FILE *fp; double d; @@ -642,8 +642,12 @@ oputW( /* print coefficient */ ) { RREAL contr[3]; + /* shadow ray not on source? */ + if (r->rsrc >= 0 && source[r->rsrc].so != r->ro) + setcolor(contr, 0.0, 0.0, 0.0); + else + raycontrib(contr, r, PRIMARY); - raycontrib(contr, r, PRIMARY); (*putreal)(contr, 3); }