mmp / pbrt-v2

Source code for the version of pbrt described in the second edition of "Physically Based Rendering"
http://pbrt.org
990 stars 343 forks source link

Fix the bug about the direction of Normal. #55

Open nothinglo opened 8 years ago

nothinglo commented 8 years ago

I have tested. It seems wrong direction of the triangle normal.

DaviesX commented 7 years ago

If the order of those 3 vertices is counter-clockwise, then the normal is indeed v_12 x v_13.

mmp commented 5 years ago

Changing this would end up flipping the normals of all triangles, which in turn would cause images to be quite different. Admittedly we haven't documented the expected vertex ordering, but given @DaviesX 's observation, I think that decreeing that they are counter-clockwise and leaving the code as is is the best thing at this point.