mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.93k stars 1.2k forks source link

Is refraction implemented correctly in v3 BDPT? #332

Closed rainbow-app closed 1 year ago

rainbow-app commented 1 year ago

Hello.

I'm thinking of borrowing some pbrt code. However, I have a suspicion that refraction implementation is faulty. Is my suspicion a result of my ignorance, or is the refraction really wrong?

Thanks.

rainbow-app commented 1 year ago

Ok, it's my ignorance. Read the textbook, then looked at code: the direction is tracked in mode in si. Sorry.