# | Line 118 | Line 118 | void (*addobjnotify[8])() = {ambnotify, NULL}; | |
---|---|---|
118 | ||
119 | int do_irrad = 0; /* compute irradiance? */ | |
120 | ||
121 | + | int rand_samp = 0; /* pure Monte Carlo sampling? */ |
122 | + | |
123 | double dstrsrc = 0.0; /* square source distribution */ | |
124 | double shadthresh = .03; /* shadow threshold */ | |
125 | double shadcert = .75; /* shadow certainty */ | |
# | Line 179 | Line 181 | ray_trace( /* trace a primary ray */ | |
181 | ) | |
182 | { | |
183 | rayorigin(r, PRIMARY, NULL, NULL); | |
184 | < | samplendx++; |
184 | > | samplendx = rand_samp ? random() : samplendx+1; |
185 | rayvalue(r); /* assumes origin and direction are set */ | |
186 | } | |
187 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |