protected Sampler(FilmExtent sampleExtent, int samplesPerPixel, float shutterOpen, float shutterClose) { _xStart = sampleExtent.XStart; _xEnd = sampleExtent.XEnd; _yStart = sampleExtent.YStart; _yEnd = sampleExtent.YEnd; _samplesPerPixel = samplesPerPixel; _shutterOpen = shutterOpen; _shutterClose = shutterClose; }
public StratifiedSampler( FilmExtent sampleExtent, int xPixelSamples, int yPixelSamples, bool jitter, float shutterOpen, float shutterClose) : base(sampleExtent, xPixelSamples * yPixelSamples, shutterOpen, shutterClose) { _xPixelSamples = xPixelSamples; _yPixelSamples = yPixelSamples; _jitter = jitter; _xPos = sampleExtent.XStart; _yPos = sampleExtent.YStart; _sampleBuffer = new float[5 * xPixelSamples * yPixelSamples]; }