[−][src]Module tray_rust::sampler
Provides the Sampler trait which is implemented by the various samplers to provide stratified, low-discrepancy, adaptive sampling methods and so on through a simple trait interface
Re-exports
pub use self::uniform::Uniform; |
pub use self::ld::LowDiscrepancy; |
pub use self::adaptive::Adaptive; |
pub use self::block_queue::BlockQueue; |
Modules
adaptive | Provides an adaptive sampler which will start sampling at one rate and then take more samples if it determines more are necessary for the pixel. The samples generated are the same as those from the Low Discrepancy sampler but the number of samples taken per pixel will vary. |
block_queue | Provides a queue of block indices that the sampler positions can be initialized from for the worker threads. The queue itself is not changed after creation we simply work through it with an atomic counter to track the index of the next block to work on |
ld | Provides a high quality sampling scheme based on (0, 2)-sequences See sec. 7.4.3 of Physically Based Rendering |
morton | |
uniform | Provides the simplest and worst sampling method, the Uniform sampler takes a single sample at the center of each pixel in its region |
Structs
Region | Defines a region of the image being sampled in pixel coordinates |
Sample | Provides a simple way to pass around a 3 component sample consisting of one 2D and one 1D sample |
Traits
Sampler | Provides the interface for all samplers to implement. Defines functions for getting samples from the sampler and checking the sampler has finished sampling the region |