Create a DirectX shader

  1. Select Window > Rendering Editors > Hypershade to open the Hypershade window.
  2. In the Create tab, select Maya > Surface > DirectX 11 Shader.

    A DirectX 11 Shader is created, with AutodeskUberShader.fxo automatically loaded.

  3. Press 6 for textured mode and 7 to use scene lighting.
  4. Tip: Both textured and non-textured modes are supported and all light modes (Use All Lights, Use Selected Lights, Use No Lights and Use Default Lighting) are supported.
    Note:

    When loading an .fx file, if any of the parameters in your DX11 shader match in name and type with parameters in an .fx file that you have previously loaded, then existing scene values are used for these parameters instead of default ones from the new file.

    For example, if you have two effect files, and effect1.fx has a gAmbient parameter with a default value of green, and effect2.fx has gAmbient parameter with default value of red, and you load first effect1, then effect2, the gAmbient parameter value remains green when effect2 is loaded. In addition, if you load effect1, then change the gAmbient color to blue, then load effect2, gAmbient remains blue, since the current value is preserved.

    This allows you to switch from a simple effect to a more complex effect without affecting the current scene values of ambient and other shared parameters.

Related topics