Closed TzuChieh closed 6 months ago
Additional issues found in the process:
LatLongEnvEmitter::emitRay()
and LatLongEnvEmitter::genDirectSample()
).I always thought my environment light implementation is slightly off--the noise level just doesn't seem right (just a feeling). Now I think there is actually something wrong: the environment sphere is being modified to have a finite size in an update, and the PDF should not depend on its direction only. Where is the pdfA -> pdfW cosine term? Oh my god....
The default size of the environment sphere is quite large though (> 1km, most cosine terms should be ~1; nevertheless, this is an error).
Should be corrected at this point 95805a3.
Move some of the geometry hacks in
LatLongEnvEmitter
as helper methods inPLatLongEnvSphere
.PLatLongEnvSphere
should stay general & low-level so more environment emitter can depend on it in the future.Some helper methods of
PLatLongEnvSphere
can generate hit event.This should be done before starting the update:
PLatLongEnvSphere
.