|
Post by jonoke on Jun 21, 2022 4:49:10 GMT
hi, I'm at the end of chapter 10 - patterns. All my tests pass - but I get bands of noise on a checkered plane. any clues were to look for this (assuming it's not correct). thanks. ps ... doesn't happen on the ring pattern ... Attachments:
|
|
|
Post by Jamis on Jun 22, 2022 2:28:06 GMT
Hey jonoke, that kind of thing (called "acne") often happens at boundaries, where floating-point round-off can make a number effectively (e.g.) zero at one point, and greater (or less) than zero at the next. Without seeing your code, it's hard to say exactly what you might do to fix it. Often, it's sufficient to just slightly modify your scene, for example by translating the checker pattern some small amount (e.g. +0.0001 in y). Usually, adjusting where the boundaries are can make it go away. However, if the root issue is something else, translating the pattern may not have any effect. You might try it and see what happens. If you have your code somewhere online, I'd be happy to take a look and see if I notice anything obvious.
|
|
|
Post by jonoke on Jun 22, 2022 10:08:03 GMT
Wow. Thanks so much - it was acne. Something about things being at whole numbers. Translating pattern in Y by a whole number like 1.0 or 2.0 did nothing, but translating the pattern in Y by just 0.000000000000001 fixed it!
So enjoying the book - I'm using to dig into learning F#.
Thanks again.
|
|