oops -- switch to correct Range convention

metadata
Wenzel Jakob 2011-06-25 01:48:55 +02:00
parent d0a6d3276e
commit f724ce6e9c
2 changed files with 5 additions and 2 deletions

View File

@ -27,6 +27,9 @@
^data/windows/mitsuba_res.res$
^dist/.*$
# Debugging history files
^\.gdb_history$
# Dependencies
^dependencies/.*$

View File

@ -80,7 +80,7 @@ public:
ref<Camera> camera = m_scene->getCamera();
result->clear();
for (size_t i=range->getRangeStart(); i<range->getRangeEnd(); ++i) {
for (size_t i=range->getRangeStart(); i<=range->getRangeEnd(); ++i) {
m_sampler->setSampleIndex(i);
Point2 sample = m_sampler->next2D();
@ -171,7 +171,7 @@ ParallelProcess::EStatus IrradianceSamplingProcess::generateWork(WorkUnit *unit,
/* Reserve a sequence of at most 'granularity' samples */
size_t workSize = std::min(m_granularity, m_sampleCount - m_samplesRequested);
RangeWorkUnit *range = static_cast<RangeWorkUnit *>(unit);
range->setRange(m_samplesRequested, m_samplesRequested + workSize);
range->setRange(m_samplesRequested, m_samplesRequested + workSize - 1);
m_samplesRequested += workSize;
return ESuccess;