-
|
Hello. I am getting this kind of effect in the renders compared to what is shown in the book: Does anybody have an explanation for why this might be happening? |
Beta Was this translation helpful? Give feedback.
Answered by
ayaanmaan
Dec 5, 2025
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ayaanmaan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment






I found the problem! It was a line in
camera.h:if (world.hit(r, interval(0, infinity), rec)) {I compared with the original repo and found the difference here:
if (world.hit(r, interval(0.001, infinity), rec)) {Why does this lead to the weird behaviour though, I still don't know? Darkened colors, weird artifacts, cascading images, longer render times (almost double at low pixel sample sizes).
For another example, observe the final renders
my code (before fix) took around 3 hours to render at
samples_per_pixel = 1000andmax_depth = 1000(╥﹏╥)fast render at
samples_per_pixel = 10andmax_depth = 20from original repo's code