adds ray generation