added option for normalizing ray direction vector.
don't normalize ray direction when it's length doesn't matter.