Hmm! Maybe a self-intersection? Although it doesn’t look dark enough for a shadow. Compare that with how dark the spheres’ shadows are. I wonder if it’s actually something in the shading calculation?
The best way to track this is to do something like the following:
-
Find the <x,y> pixel coordinates of a point in your image that’s misbehaving. (This could be any of the pixels in the image that are showing the shadow in question.)
-
Run your render for just that pixel.
-
Add a breakpoint (or a bunch of print statements, if you’re like me) when you cast your shadow rays, and see what object they’re intersecting. (I suspect they’re not intersecting anything, but this will tell you for sure.) If there are no intersections, do this again but with a breakpoint/print in the shading routing, and step through it, looking at the computed values there.
Given that the darker shade seems to appear right about eye-level, I suspect there might be something in how your reflection vector is being computed?
If none of that helps, let me know where you’ve got your code hosted and I’d be happy to take a look and see if anything jumps out at me.