Using kd-tree for shadow rays