Thanks for your great work.
In your code of evaluating direct light using BSDF sampling with MIS, you add a new vertex after recording radiance. I wonder why you set the new vertex with zero radiance when always doing NEE.
Thanks.
Spectrum L = throughput * value * weight;
if (!L.isZero()) {
recordRadiance(L);
}
if ((!isDelta || m_bsdfSamplingFractionLoss != EBsdfSamplingFractionLoss::ENone) && dTree && nVertices < MAX_NUM_VERTICES && !m_isFinalIter) {
if (1 / woPdf > 0) {
vertices[nVertices] = Vertex{
dTree,
dTreeVoxelSize,
ray,
throughput,
bsdfWeight * woPdf,
(m_nee == EAlways) ? Spectrum{0.0f} : L,
woPdf,
bsdfPdf,
dTreePdf,
isDelta,
};
++nVertices;
}
}