This patch generalises the pass reading shaders into input reading shaders. This is done make future development easier.