Generating random sampling distributions using stochastic rasterization
Stochastic rasterization may be used as a flexible volumetric sampling mechanism. By bounding and tessellating the sampling domain, uniform sampling distributions over an arbitrary domain can be efficiently generated in up to five dimensions. Sample placement allows pseudo-random, stratified random, or blue noise sampling. Random sampling with an adaptive density function may be achieved by adding one dimension.
1. A method comprising:
using a rasterizer to generate samples over an arbitrary domain by:
bounding the arbitrary domain;
tessellating a bounding shape in a form of a geometric object with flat sides into a number of non-overlapping adjacent primitives;
rasterizing the primitives to generate random samples;
testing the samples against the arbitrary domain; and
generating adaptive sampling distributions by representing a density function, that shows a shape of the arbitrary domain, as a height field, adding one dimension to the arbitrary domain:
sampling this new domain using the rasterizer; and
projecting the samples on the original domain.
2. The method of claim 1 including using conservative rasterization to allow arbitrary sample placement within each pixel.
3. The method of claim 1 wherein the rasterizer allows programmable sample placement to allow pseudo-random distributions.
4. The method of claim 1 including generating samples for numerical computations.
5. The method of claim 4 including performing numerical integration over the arbitrary domain by:
generating samples over the domain using the rasterizer;
evaluating the integrand defined over the arbitrary domain at each sample in the pixel shader; and
accumulating the result.
6. At least one non-transitory computer readable medium comprising a plurality of instructions and, in response to being executed on a computing device, causing the computing device to carry out a method comprising:
using a stochastic rasterizer to generate samples over an arbitrary domain by:
bounding the arbitrary domain;
tessellating a bounding simploid into a number of non-overlapping adjacent primitives;
rasterizing the primitives to generate random samples;
testing the samples against the arbitrary domain; and
generating adaptive sampling distributions by representing a density function, that shows a shape of the arbitrary domain, as a height field, adding one dimension to the arbitrary domain:
sampling this new domain using the rasterizer; and
projecting the samples on the original domain.
7. The medium of claim 6 further storing instructions using that when executed by the computing device cause the computing device to use conservative rasterization to allow arbitrary sample placement within each pixel.
8. An apparatus comprising:
a processor to use a rasterizer to generate samples over an arbitrary domain, bound the arbitrary domain, tessellate a bounding shape in a form of a geometric object with flat sides into a number of non-overlapping adjacent primitives, rasterize the primitives to generate random samples, test the samples against the arbitrary domain, and generate adaptive sampling distributions by representing a density function, that shows shapes of the arbitrary domain, as a height field, add one dimension to the arbitrary domain, sample this new domain using the rasterizer and produce the samples on the original domain; and
a memory coupled to said processor.
9. The apparatus of claim 8 including an operating system.
10. The apparatus of claim 8 including a battery.
11. The apparatus of claim 8 including firmware and a module to update said firmware.
12. The apparatus of claim 8 , said processor to use stochastic rasterization to generate samples over the arbitrary domain.
13. The apparatus of claim 12 , said processor to use conservative rasterization to allow arbitrary sample placement within each pixel.
14. The apparatus of claim 12 , the rasterizer allows programmable sample placement to allow pseudo-random distributions.