Fixing shadow ray calculation