Change 3dsMax Shader Compiler?

Anyone know if this is possible? We’ve hit a bug with the one in 2010 and verified that our HLSL builds in other environments. If we could switch it out maybe we’d be able to work around this issue.

I ‘think’ you can. At least I remember looking at it once.

I believe you can have your compiler via i.e: ‘string ParamID = “0x000001”;’ parameter.
But it would require some work through the SDK and I believe when I looked at it the documentation was a bit minimal and no sample compiler.

That was a long time ago though, max8. So it might be different now.

Not too much help I guess.

btw, did you try just using another one of max’s buildin compilers?

There are a bunch of different ones.

Max_Standard
DxSAS
Another DXSAS
CGFX

What’s the bug you’re seeing?

The bug was that we had a ton of parameters and apparently it was too much. Adding the [fastopt] tag in hlsl got it to compile though.

Kees, how do you change that? Would be good to know in the future how to try different compilers.

You can tell 3ds Max what hlsl parser to use by adding one of the following flags to the top of your shader:

<no flag added> //3ds Max uses the default parser

string ParamID = “0x000001”; //Max uses its first generation DXSAS parser, which is now outdated

string ParamID = “0x002”; //Max uses the CgFX parser - use this if your shader is written in Cg instead of HLSL

string ParamID = “0x003”; //Max uses the newer version of the DXSAS parser

Keep in mind that the parser is going to expect different semantics and annotations for the code that generates the GUI elements when you tell it to use the DXSAS parser instead of the Max default parser.