Skip to content

Commit

Permalink
Fixed comments for DirectIllumination, so they are clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-davidovic committed Jan 9, 2013
1 parent ff7a56e commit 5219de8
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/vertexcm.hxx
Expand Up @@ -700,6 +700,17 @@ private:

bsdfRevPdfW *= continuationProbability;

// wLight = ratio of area pdfs
// both area pdfs are with respect to the same shading point,
// therefore their distance^2 and cosine terms cancel out and we write
// wLight = ratio of solid angle pdfs

// Also note that we multiply by lightPickProb only for wLight,
// as it cancels out in wCamera

// Partial light sub-path MIS weight [tech. rep. (44)]
const float wLight = Mis(bsdfDirPdfW / (lightPickProb * directPdfW));

// What we ultimately want to do is
// ratio = emissionPdfA / directPdfA
// What we have is
Expand All @@ -710,12 +721,6 @@ private:
// ratio = (emissionPdfW * cosToLight / dist^2) / (directPdfW * cosAtLight / dist^2)
// ratio = (emissionPdfW * cosToLight) / (directPdfW * cosAtLight)

// Also note that we multiply by lightPickProb only for wLight,
// as it cancels out in wCamera

// Partial light sub-path MIS weight [tech. rep. (44)]
const float wLight = Mis(bsdfDirPdfW / (lightPickProb * directPdfW));

// Partial eye sub-path MIS weight [tech. rep. (45)]
const float wCamera = Mis(emissionPdfW * cosToLight / (directPdfW * cosAtLight)) * (
mMisVmWeightFactor + aCameraState.dVCM + aCameraState.dVC * Mis(bsdfRevPdfW));
Expand Down

0 comments on commit 5219de8

Please sign in to comment.