melvinw / tracer

ISC License
0 stars 1 forks source link

Implementation of scattering pass #9

Open kishore-ganesh opened 2 years ago

kishore-ganesh commented 2 years ago

What I have done:

  1. Added scatter pass as discussed in the meeting. After the initial pass, I cast ray in random directions and use the scattered flux of the object intersected in order to affect the absorbed flux of the object from where rays were casted.

What needs to be done:

  1. There's repetition of code - I was thinking something like: void process_primitives(thread_pool& tpool, std::vector<AnnotatedTriangle>& triangles, std::function<void(size_t, size_t, AnnotatedTriangle)> process_function) { so that we just need to write what goes within the loop rather than repeating the loop twice. Should I go ahead and do it?