When
an HLSL effect does not display correctly in Maya, follow these
steps:
- Select the shading node and open the Diagnostics section
in the Attribute Editor. This text
box includes all compiler feedback and plug-in assumptions made
when trying to load the shader into Maya.
If compilation errors
have occurred, this text box includes the error and shader line
number that needs to be fixed. In addition, the newer Direct X HLSL
compilers may drop support for older vertex and fragment profiles,
requiring you to post the shader to a more recent profile.
- Check shader include paths. Any included
files must resolve relative to the location of the shader file.
These errors are also displaced in the Diagnostics section.
- Where textures are not displayed correctly,
ensure that an explicit texture type semantic (for example, 2D,
1D, cube map) is included to inform Maya what type of texture the
shader requires. By default, Maya assumes all unspecified textures
are 2D.
- If the geometry is corrupted, try changing
the order of matrix multiplication in the shader.
- If lighting and shading appears incorrect,
ensure that all input vectors include a space semantic
to indicate to Maya which co-ordinate system (for example view,
object, and so forth) the shader requires the parameter in.