mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.8k stars 429 forks source link

pbrt v4 book formula 13.9 maybe error #365

Open AndrewChan2022 opened 1 year ago

AndrewChan2022 commented 1 year ago

simple path trace, direct light evaluate 13.9, P(pi¯) = Le(pi -> pi-1) f(pi -> pi-1 -> pi-2) |cosθi| V(pi <->pi-1) / (pl(wi) p(l)) * β

here cosθi should be angle on shading surface, so cosθi-1

the code also using shading point angle.

AndrewChan2022 commented 1 year ago

formula 14.8,
integrate over majorant segment: third line: miss σ_maj^3

AndrewChan2022 commented 1 year ago

text 11.2, delta tracking:

If the Russian roulette termination probability at each sampled point is set to be equal to the ratio of σn and σmaj, then the scaling cancels and the estimator becomes -> termination probability should be 1 - ratio of σn and σmaj

code also using termination probability 1 - σn / σmaj