![Comparison](https://i.stack.imgur.com/HQAFB.jpg)

<http://pastebin.com/vkTJt0sT>

I am trying to render an image similiar to the left one and having problem with shadows+reflections.

Right now, only the shadow code is open for showing the problem.

As you can see, the red ball should be shadowed near the green one, but the pixels all get messed up for some weird reason. When I close the shadow part of the code, it renders the red ball normally without shadows.

I think the root of this problem is also affecting reflections. hope you guys can give me some tips; I’m losing it.