Specifying Pass Parameters (Legacy 3DS MAX)
- Last UpdatedApr 02, 2025
- 2 minute read
Pass
By default, all parameters go to the default pass. But you can specify different parameters for each pass.
Not all the parameters can be specified per pass. In fact, parameters like exportHint are global for the mesh and not pass specific.
Pass details
For each pass you can set:
-
szShader to change the shader.
-
State to change a state
-
All the other user defined parameters (AnyOtherName) can be specified per pass.
-
Skip the rendering of this pass.
By default, when a pass needs a parameter but cannot find it, it uses the parameters specified in the standard pass.
Pass_id
Use the string $SetPass pass_id to change the current pass.
Use the string $SkipPass pass_id to prevent this mesh being rendered in this pass.
The valid values for pass_id are:
-
standard (default)
-
dofhdrb
-
csm
-
shadowmap
-
reflection
-
silhouette
Code example
In the following example, the first parameters go to the standard pass, while after $SetPass dofhdrb they go to the dofhdrb pass.
At the end, we use SkipPass reflection to skip the rendering of this mesh in reflections.
exportHint = vColor, vUV1, mTextures
szShader = EngineLib|Txt|OpaqueClipmap
MaskClipValue = 0.12
$SetPass dofhdrb
state cullMode = standard
szShader = EngineLib|Txt|Opaque
$SkipPass reflection
Code example
You can also directly specify the standard pass or set the current pass multiple times.
exportHint = vColor, vUV1, mTextures
paramTest = 0.5 0.2 // will go to the standard pass
$SetPass dofhdrb
szShader = EngineLib|Txt|Opaque
paramTest = 0.1 0.7 // will go to the dofhdrb pass
paramTestHDR = 1 2 3 // will go to the dofhdrb pass
$SetPass standard
state cullMode = standard
szShader = EngineLib|Vc|Test
$SetPass dofhdrb
state cullMode = none