Hardware shaders enable you to create interesting graphical effects through small binary programs that are uploaded to the GPU. GPUs are much more efficient than CPUs for performing select tasks that are commonly found in computer graphics applications.
To write these binary programs, you can use high-level shader languages such as HLSL and GLSL to create an effects file.
Three plug-ins are available in Maya that enable you to create hardware shaders that load these effects files:
Load the required shader plug-in.
The corresponding hardware shader appears in the Create tab of the Hypershade.
Ensure that you are running Maya in the correct display mode.
To create and render GLSL shaders, you must run Maya in OpenGL Core Profile mode in Viewport 2.0. Select Windows > Settings/Preferences > Preferences to open the Preferences window, and from the Display category, select OpenGL Core Profile as your Rendering engine.
Alternatively, to create and render HLSL shaders, you must run Maya in DirectX 11 mode. From the Preferences window, Display category, select DirectX 11 as your Rendering engine.
Click Hotkey 6 or select Shading > Hardware Texturing from the panel menu.
Hardware shaders are used when texturing mode is enabled in the viewport.
To see hardware shaders, you must have a supported video card. Check the Autodesk website (www.autodesk.com/hardware) for the most accurate information about qualified hardware.
A single effect can specify one or more techniques to provide different shading variations. Maya exposes the available techniques in a drop-down list in the Attribute Editor.
Uniform parameters are used to map Maya information such as file textures and lighting, as well as to expose shader inputs. Maya exposes these as shader attributes in the Attribute Editor.
Varying parameters allow you to route per-vertex data from geometry. This includes selecting the UV sets, color sets, tangents and normals your shader will use. Maya exposes these parameters with a right-click menu from which you can select the data to pass to the shader.