I took that one as a given I’m new to C and C++ so I might need a few rounds on cleaning things up, I suspect.
I’m hopeful we might actually get slightly better noise per sample in a majority of scenes, especially if I can get 4 wavelength hero wavelength sampling working alongside a wavelength PDF. There will of course be scenes which end up with more noise in spectral, but I will do what I can to minimise that.
This is pretty straight-forward to implement if we’re happy to accept spectral ‘primaries’ such as the ones from BT.2020, since we can just use the same 3 wavelengths for every sample. If we want to keep things exactly how they are now, that’s substantially harder, since it’ll mean a bunch of branching or duplication if I understand correctly.