Handle shader inputs that have component masks

(and simplify the code that deals with input / output mapping)