I’m looking to do computations of diffused reflections. The simple case,
- The camera produces rays pointing at a diffuse wall.
- The value is the sum of the rays coming in from all directions into that point (attenuated by direction)
What would be the best way to approach the problem?
One idea is to map the camera to the wall, collect the intersection points in a buffer and then re-run the program for all pixels * all angles, but it’s not clear what is a good way to combine results as this either requires an insane amount of memory or a lot of atomic operations. It is also difficult in this way to handle multi level bounces
Another is to send multiple rays in the same direction and then bounce them randomly, but again, there is a question as to what is a good way to combine the result. It would either mean a lot of runs or a lot of memory or a lot of atomics.
Is there a way to do the first or a combination of the first and the second recursively, i.e generate the second jump rays from the first set without storing them into a buffer and re-running?
Thanks for any advice