added ray direction for emission