aboutsummaryrefslogtreecommitdiff
path: root/src/sampling/sampler.cpp
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-01-17 00:09:15 +0100
committerJulian T <julian@jtle.dk>2021-01-17 00:09:15 +0100
commit94217187eb2785939458f08d96c7b1b9e55439ab (patch)
treeb10e4ab95f213b13b90ac5e0053ed9e92f973693 /src/sampling/sampler.cpp
parented14718ff073e285374fad2d3471552b9b497825 (diff)
Minor changed and draft for random samplingold_rework
Diffstat (limited to 'src/sampling/sampler.cpp')
-rw-r--r--src/sampling/sampler.cpp10
1 files changed, 10 insertions, 0 deletions
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;
+}