Hardware shading node plug-in examples
The Maya Developer Kit contains the following hardware shader node plug-in examples:
MPxShaderOverride based
- dx11Shader and glslShader: shader implementations that are based on the contents of a shader effect. They demonstrate the use of technique level annotations to determine specific characteristics of the shader. They also demonstrate the use of hardware selection to perform component selection and draw non-material items.
- hwPhongShader: examine this example to compare the usage of Viewport 2.0 interfaces versus the raw OpenGL drawing that was used previously in the Legacy Default Viewport.
- vp2BlinnShader: simplified example that uses an
MPxShaderOverride
. The plug-in shows the usage of the basic interfaces for this type of override.
MPxShadingNodeOverride / MPxSurfaceShadingNodeOverride based
- checkerShader: demonstrates the use of a shader description that is written as an XML file on disk.
- brickShader: provides an implementation of a brick texture (
MPxShadingNodeOverride
)
- onbShader: provides an implementation of an Oren-Nayer shader (
MPxSurfaceShadingNodeOverride
).
- simpleNoiseShader: creates a dependency node as a texture shader called simpleNoise that implements the Maya wave noise texture type.
Attribute matching functionality
- anisotropicShader: demonstrates use of the attribute matching feature to enable software shading nodes to render in Viewport 2.0
Functionality to dump fragment code (procedures that define a shader effect) from existing nodes
- fragmentDumper: produces the XML file of a fragment graph.
This feature allows you to examine Maya's internal fragment implementation. Fragments can be used for MPxShadingNodeOverride
/ MPxSurfaceShadingNodeOverride
based shader nodes.