--- ray/src/rt/rpict.c 2005/02/07 20:13:55 2.74 +++ ray/src/rt/rpict.c 2008/04/24 10:28:25 2.79 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rpict.c,v 2.74 2005/02/07 20:13:55 greg Exp $"; +static const char RCSid[] = "$Id: rpict.c,v 2.79 2008/04/24 10:28:25 schorsch Exp $"; #endif /* * rpict.c - routines and variables for picture generation. @@ -14,7 +14,11 @@ static const char RCSid[] = "$Id: rpict.c,v 2.74 2005/ #include #include #else +#ifndef MINGW #include +#else +#include +#endif #include #endif #endif @@ -67,6 +71,8 @@ void (*trace)() = NULL; /* trace call */ int do_irrad = 0; /* compute irradiance? */ +int rand_samp = 0; /* pure Monte Carlo sampling? */ + double dstrsrc = 0.0; /* square source distribution */ double shadthresh = .05; /* shadow threshold */ double shadcert = .5; /* shadow certainty */ @@ -675,9 +681,8 @@ pixvalue( /* compute pixel value */ return(0.0); } vdist = ourview.vdist; - - samplendx = pixnumber(x,y,hres,vres); /* set pixel index */ - + /* set pixel index */ + samplendx = pixnumber(x,y,hres,vres); /* optional motion blur */ if (lastview.type && mblur > FTINY && (lmax = viewray(lorg, ldir, &lastview, hpos, vpos)) >= -FTINY) { @@ -709,7 +714,7 @@ pixvalue( /* compute pixel value */ } } else { /* non-standard view case */ double dfd = PI/4.*dblur*(.5 - frandom()); - if (ourview.type != VT_ANG) { + if (ourview.type != VT_ANG && ourview.type != VT_PLS) { if (ourview.type != VT_CYL) dfh /= sqrt(ourview.hn2); dfv /= sqrt(ourview.vn2); @@ -726,7 +731,7 @@ pixvalue( /* compute pixel value */ return(0.0); } - rayorigin(&thisray, NULL, PRIMARY, 1.0); + rayorigin(&thisray, PRIMARY, NULL, NULL); rayvalue(&thisray); /* trace ray */