I could try using a more common approach of sending one ray per pixel and on a hit we generate diffuse, specular and light rays. The diffuse and specular rays spawn a light ray on hit while a light ray does not spawn another ray on hit.
This would require some rewriting of the kernel and probably cost a lot of memory. However, the current kernel should be extandable by handling each stage like an iteration in the current kernel.
This would not be beneficial for the offline mode but should be better regarding time to noise ratio.
I could try using a more common approach of sending one ray per pixel and on a hit we generate diffuse, specular and light rays. The diffuse and specular rays spawn a light ray on hit while a light ray does not spawn another ray on hit.
This would require some rewriting of the kernel and probably cost a lot of memory. However, the current kernel should be extandable by handling each stage like an iteration in the current kernel.
This would not be beneficial for the offline mode but should be better regarding time to noise ratio.