Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. __device__ Spectrum SampleLi(const Interaction& it, const float u[2], glm::vec3* wi, float* pdf)
  2. {
  3. *wi = glm::normalize(position - it.point);
  4. *pdf = 1.0f;
  5. return I / glm::pow(glm::length(position - it.point), 2); //Irradiance / DistanceSquared -> radiance decreases over distance
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement