Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

Commit

Permalink
Bidir: fix (horrible hack, in fact) for some surfaces not illuminated.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBluecame committed Apr 8, 2017
1 parent 38eafc5 commit 61fdc3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/integrators/bidirpath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,13 @@ inline bool biDirIntegrator_t::connectLPath(renderState_t &state, int t, pathDat
ls.sp = &spLight;
// generate light sample, abort when none could be created:
if( !light->illumSample(z.sp, ls, lRay) ) return false;

//FIXME DAVID: another series of horrible hacks to avoid uninitialized values and incorrect renders in bidir. However, this should be properly solved by implementing correctly the functions needed by bidir in the lights and materials, and correcting the bidir integrator itself...
ls.sp->P = point3d_t(0.f, 0.f, 0.f);
vector3d_t wo = lRay.dir;
light->emitSample(wo, ls);
ls.flags = 0xFFFFFFFF;

lcol = ls.col/(ls.pdf*lightNumPdf); //shouldn't really do that division, better use proper c_st in evalLPath...
// get probabilities for generating light sample without a given surface point
vector3d_t vec = -lRay.dir;
Expand Down

0 comments on commit 61fdc3e

Please sign in to comment.