VPL time computation fix
parent
e53c4afea6
commit
cc84bfee3c
|
@ -29,8 +29,7 @@ static void appendVPL(const Scene *scene, Random *random,
|
||||||
prunedVPLs.incrementBase();
|
prunedVPLs.incrementBase();
|
||||||
|
|
||||||
const Sensor *sensor = scene->getSensor();
|
const Sensor *sensor = scene->getSensor();
|
||||||
Float time = sensor->getShutterOpen()
|
Float time = random->nextFloat();
|
||||||
+ sensor->getShutterOpenTime() * random->nextFloat();
|
|
||||||
|
|
||||||
if (prune) {
|
if (prune) {
|
||||||
/* Possibly reject VPLs if they are unlikely to be
|
/* Possibly reject VPLs if they are unlikely to be
|
||||||
|
@ -43,7 +42,7 @@ static void appendVPL(const Scene *scene, Random *random,
|
||||||
Vector2i size = sensor->getFilm()->getCropSize();
|
Vector2i size = sensor->getFilm()->getCropSize();
|
||||||
for (int i=0; i<nSamples; ++i) {
|
for (int i=0; i<nSamples; ++i) {
|
||||||
if (sensor->needsTimeSample())
|
if (sensor->needsTimeSample())
|
||||||
time = sensor->sampleTime(random->nextFloat());
|
time = random->nextFloat();
|
||||||
|
|
||||||
sensor->sampleRay(ray, Point2(random->nextFloat() * size.x,
|
sensor->sampleRay(ray, Point2(random->nextFloat() * size.x,
|
||||||
random->nextFloat() * size.y), Point2(0.5f), time);
|
random->nextFloat() * size.y), Point2(0.5f), time);
|
||||||
|
|
Loading…
Reference in New Issue