You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in "response" to #482 which I've read through.
To my understanding the code record.SetFaceNormal(new Vector3(0, 0, 1)); should prevent some of the rectangles to be black. However, in my implementation they do appear black, and depending on whether I switch the front face calculation on or off, either 3 rectangles (off: top, left, back) or 2 rectangles (on: right, bottom) appear black.
I've rechecked my implementation a few times but I can't seem to find any discernible difference in code. I set the normal via the method above which has the same implementation as the source in this repo. The Lambertian scatter method is also 1:1 the same.
From checking some of the other implementations of this book, most of them seem to implement the extra FlipFace "modifier" as well as the record.SetFaceNormal method making the source code in this repo the only implementation (I've found so far) that only uses the latter.
The text was updated successfully, but these errors were encountered:
Ah, sorry about this. I had one version of my implementation that saved the Ray on the HitRecord and calculated the front face from that. Apparently while trying around some things I deleted that line and always calculated the front face against a ray direction of (0,0,0).
This is in "response" to #482 which I've read through.
To my understanding the code
record.SetFaceNormal(new Vector3(0, 0, 1));
should prevent some of the rectangles to be black. However, in my implementation they do appear black, and depending on whether I switch the front face calculation on or off, either 3 rectangles (off: top, left, back) or 2 rectangles (on: right, bottom) appear black.I've rechecked my implementation a few times but I can't seem to find any discernible difference in code. I set the normal via the method above which has the same implementation as the source in this repo. The Lambertian scatter method is also 1:1 the same.
From checking some of the other implementations of this book, most of them seem to implement the extra
FlipFace
"modifier" as well as therecord.SetFaceNormal
method making the source code in this repo the only implementation (I've found so far) that only uses the latter.The text was updated successfully, but these errors were encountered: