Added shadow hit function