ShaderGenerator Export Parameters (Legacy 3DS MAX)
- Last UpdatedApr 02, 2025
- 2 minute read
This topic is related to Shader Generator (Legacy 3DS MAX).
Export Parameters for ShaderGenerator
szShader
-
Selects which shader to use. The standard syntax is "Library|ShaderName|ShaderNode". It depends on how the shader has been composed.
-
Example: szShader = MyLib|VcTxt|OpaqueOutput
-
Default: If not specified, it is set to the code's default shader.
-
This can also be specified by using szName.
exportHint
-
When no hint is specified, the exporter exports all the useful data that it finds in the mesh and its material.
-
For more information about which material data is considered valid, see Automatic material export (Legacy 3DS MAX).
Geometry hints
-
Values: vNormal, vTangent, vColor, vColorRGBA, vUV1, vUV2, vUV3, vUV4, vUV5, vNone.
-
When specified, they must exist.
-
vNone is a special case; it exports the position only.
-
None of them: The exporter exports any data it finds in the mesh.
Material hints
-
Values: mSpecular, mColors, mTextures, mTexturesValues, mValues, mStates, mNone.
-
When specified: Only valid values are exported.
-
When not specified: The exporter exports any data it finds in the material.
-
Default: All data.
Syntax example with material
This is an example of exporting with material.
exportHint = vColor, vUV1, mTextures
Syntax example without material
This is an example of exporting without a material.
To export without any material data use mNone.
exportHint = vColor, mNone
You can specify it multiple times. They are combined.
exportHint = vColor, vUV1
exportHint = mTextures
State
-
Specifies any of the material states.
-
Set stateName to stateValue
-
Example: Set blendMode to alphaBlending.
-
For more information see, list of Material States.
fEmissiveMul
-
Creates a material parameter with this name.
-
If both fEmissiveMul and the 3DSMax material Self-Illumination value are exported, the precedence goes to the value specified in the user buffer fEmissiveMul = value
-
Default: 1.0
-
If not specified anywhere in 3DSMax, the shader has no access to it as a material parameter.
fFadeValue
-
Sets the opacity value of the object.
-
If both fFadeValue and the 3DSMax material Opacity value are exported, the precedence goes to the value specified in the user buffer fFadeValue = value
-
This value is the same value that the engine uses when fading objects. If the engine starts a fade operation, then this value is overwritten.
-
This value cannot be accessed by the shaders as a material parameter.
-
Default: 1.0
szLight
-
When specified, enables the shader use only the specified lights.
-
Otherwise, the shader automatically searches for lights in the scene, when needed.
-
The name must perfectly match the full Light name (case sensitive). Example: szLight = MyScene|myLight01.
-
You can specify multiple times: once for each light.
castShadows
-
Supported values: Csm, ShadowMaps, All, None.
-
This value is overridden if bCastShadows is used.
-
If no cast parameter is specified, the mesh uses the default value from the configuration file.
-
Example: castShadows = csm
bCastShadows
-
Enables the mesh to cast all kind of shadows. When used, the bCastShadows parameter overrides the castShadows parameter.
-
If no cast parameter is specified, the mesh uses the default value from the configuration file.
bReceiveShadows
-
Enables the mesh to receive shadows.
-
If no receive parameter is specified, the mesh uses the default value from the configuration file.