Maya also contains special shading nodes—surfaceShader, volumeShader and displacementShader. These nodes do nothing except provide appropriately named attributes. You can connect anything you like to these nodes, which then presents that connection to rendering as the appropriate attribute name. Special mechanisms internal to Maya ensure that these special nodes do not impose any execution time overhead, and so can be used with impunity.
For descriptions of shading nodes, see Shader source code examples in Example Plug-ins.