Closed chaosink closed 6 years ago
It seems that only f[0]
of SDEdge
is used.
So I changed SDFace *f[2];
into SDFace *f;
and int f0edgeNum;
into int edgeNum;
.
Maybe it's better to use SDFace *f0;
and int f0edgeNum;
to indicate only f0
and its corresponding edge need to be recorded.
Float c = (pz[1] - z - pz[0]) * (pz[1] - z * 4 * f - pz[0]);
should be
Float c = (pz[1] - z - pz[0]) * (pz[1] - z - 4 * f - pz[0]);
@syoyo typed a wrong charactor. :smiley: And... I rendered a lot of weird pictures before discovering this. :sweat_smile:
Oops..😱 Sorry for my mistake..
...and I think it would be better PBRT has regression test suites.
@mmp Please accept this PR as soon as possible, otherwise PBRTv3 users get wrong result.
The camera bug was fixed in 8fa49b1491bfc9b0772dd8b510ca41eaab19ec99 (sorry that took so long :-p).
Thanks!
Thanks for noticing those redundant bits in the subdivision data structures. I've made a note to fix those as you suggest in the 4th edition, but will leave the pbrt-v3 code as is, since I'd prefer to keep it in sync with the book text as much as possible.
Thanks!
src/core/transform.cpp, LookAt(), left -> right
Because pbrt uses a left-handed coordiante system and the camera direction is +z, the direction of the cross product of
up
anddir
should be +x which is right.