You can follow these steps
to override a Maya shader in the scene view using a hardware shader,
such as a CgFX shader or an HLSL shader. For more information on
hardware shaders, see
Work with hardware shaders.
Before you begin, you
should first select
Window
> Settings/Preferences > Plug-in Managerand
ensure that the shader plug-in (for example, CgFX or HLSL shader
plug-in) is loaded.
- In the Attribute Editor of the Maya material
node, scroll to the Hardware Shading section. Click on the Map button
beside the Hardware Shader attribute.
- Select a hardware shader node (for example,
Cgfx Shader) from the Create Render Node window
as appropriate.
- In the hardware shader node Attribute
Editor, click the folder icon to the right of the Shader File attribute
and navigate to your shader file, for example, your .fx or .cgfx file.
NoteThe CgFx or HLSL
shader plug-in must be loaded when Maya starts. If the Cgfx Shader
or Hlsl Shader nodes do not appear in the
Create Render Node window,
select
Window >
Settings/Preferences > Plug-in Manager and enable
Auto load for cgfxShader.mll or hlslShader.mll and restart Maya.