There was old compositing method using special camera and monochromatic background: https://en.wikipedia.org/wiki/Sodium_vapor_process. Results were so good I wonder why it wasn't used more widely: use background lit with monochromatic light and special camera that has modified Bayer pattern including subpixels for that background wavelength, and you basically have perfect compositing.
Is it feasible for the Bayer mask to be swapped out as an aftermarket change on a modern digital sensor? Or does that require clean room manufacturing processes to repackage it?
I had a similar thought. Imagine a custom camera body to add a beam splitter for parallel sensors much like the original process with parallel film. One regular RGB sensor for the visible scene, and one monochromatic sensor for the narrow background spectrum.
But, I have no idea if the beam path could be devised to do this with commodity sensors and lenses, to minimize what must be bespoke.
You would have to adapt DSLR bodies for this because they already have a beam splitter (some old Sony/Minolta DSLRs had fixed mirrors, even)
New mirrorless designs and cinema cameras would have a hard time with this.
It would be easier to do what Fuji used to do: have four sensor sites, but instead of RGBW have RGBX where X is filtered to your wavelength, even then, demosaicing would create artifacts (like how you can get 10MP out of an old Nikon D1 but sharp edges are jaggy because the demosaic isn't uniform.
'At the time of its use, the sodium process yielded cleaner results than did bluescreen, which was subject to noticeable color spill (a blue tint around the edges of the matte). The increased accuracy allowed for the compositing of materials with finer detail, such as hair or Mary Poppins' veiled hat. It was also useful that the "sodium yellow" light (and its removal via the matte) had a negligible effect on human skin tones.[2] As the bluescreen process improved, the sodium vapor process was abandoned, its screen and lamps monopolizing huge studios and incurring a higher cost.'
There was only apparently one working prism ever made for the process. But it's not clear whether this is because it was so hard to make or there was not much further attempts (or a combination of both). It is not super simple to make a filter for a very narrow wavelength, dichroic filters are generally the main technique and I don't know if they could be made into elements of a bayer-like filter.