a) ShaderGenPrinterHLSL::printPixelShaderOutputStruct port courtessy of Tim N.
b) gbuffer port from hlsl,