From 94217187eb2785939458f08d96c7b1b9e55439ab Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 17 Jan 2021 00:09:15 +0100 Subject: Minor changed and draft for random sampling --- src/sampling/sampler.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/sampling/sampler.cpp (limited to 'src/sampling/sampler.cpp') diff --git a/src/sampling/sampler.cpp b/src/sampling/sampler.cpp new file mode 100644 index 0000000..d960816 --- /dev/null +++ b/src/sampling/sampler.cpp @@ -0,0 +1,10 @@ +#include "sampler.hpp" + +void Sampler::startPixel(const Vec2d &p) { + m_curPixel = p; + m_curPixelSampleIndex = 0; +} + +bool Sampler::startNextSample() { + return ++m_curPixelSampleIndex < m_sampleCount; +} -- cgit v1.2.3