An OSL shader for switching channels. You input two textures and then you can shuffle the RGBA channels around to make a new output. So for example you could have the red and green channels of texture A, green as a black output, and the alpha from texture B.
Or you could switch all the channels to use the red channel, so you’d have a monochrome output.
Page:
http://www.rensheeren.com/blog/osl-channelswitcher/
Download link:
http://www.rensheeren.com/osl/channelSwitcher_tex_v002.osl
Right-click and save as.
Enjoy! 🙂