24 |
|
|
25 |
|
#include "random.h" |
26 |
|
|
27 |
+ |
int dimlist[MAXDIM]; /* sampling dimensions */ |
28 |
+ |
int ndims = 0; /* number of sampling dimensions */ |
29 |
+ |
int samplendx; /* sample index number */ |
30 |
+ |
|
31 |
|
VIEW ourview = STDVIEW; /* view parameters */ |
32 |
|
int hresolu = 512; /* horizontal resolution */ |
33 |
|
int vresolu = 512; /* vertical resolution */ |
36 |
|
int psample = 4; /* pixel sample size */ |
37 |
|
double maxdiff = .05; /* max. difference for interpolation */ |
38 |
|
double dstrpix = 0.67; /* square pixel distribution */ |
39 |
+ |
int psuper = 2; /* pixel super-sampling rate */ |
40 |
|
|
41 |
|
double dstrsrc = 0.0; /* square source distribution */ |
42 |
|
double shadthresh = .05; /* shadow threshold */ |
338 |
|
COLOR col; /* returned color */ |
339 |
|
int x, y; /* pixel position */ |
340 |
|
{ |
341 |
< |
static RAY thisray; /* our ray for this pixel */ |
341 |
> |
static RAY thisray; |
342 |
|
|
343 |
|
if (viewray(thisray.rorg, thisray.rdir, &ourview, |
344 |
|
(x+pixjitter())/hresolu, (y+pixjitter())/vresolu) < 0) { |
347 |
|
} |
348 |
|
|
349 |
|
rayorigin(&thisray, NULL, PRIMARY, 1.0); |
350 |
< |
|
350 |
> |
|
351 |
> |
samplendx = 3*y + x; /* set pixel index */ |
352 |
> |
|
353 |
|
rayvalue(&thisray); /* trace ray */ |
354 |
|
|
355 |
|
copycolor(col, thisray.rcol); /* return color */ |