Shader float parameters not behaving correctly in Max 5.08

Sep 20, 2009 at 7:27am

Shader float parameters not behaving correctly in Max 5.08

I was seeing some crashes in Max 5.02 so I decided to update to 5.08 before reporting any bugs.

The crashes went away, thankfully, but now I am seeing some strangeness with some of my shader programs where certain float parameters are not behaving correctly. For certain parameters, no matter what I set the value to from the Max patcher, the value always seems to be 0. in the shader program.

I see no errors in the Max window.

These are patchers and shaders that previously were working fine.

There doesn’t seem to be any pattern to where the binding is declared in the .jxs (order, parameter name, etc.).

In some cases, ignoring the value of one parameter in the shader program makes other parameters start working.

This is very odd, and I have not been able to restore the working state of my shader programs. Can anyone assist? (I’m working on isolating a repro in a smaller patch.)

Thanks,
James

#45526
Sep 20, 2009 at 5:43pm

I tracked this down.

It turns out this was due to the (new?) Float Output on dial, which is *unchecked* by default. My float parameters on [0,1]were getting sent as ints, and hence truncated to 0 before they even got to the shader.

Hopefully this post will save somebody a few hours of investigation…

James

#164163

You must be logged in to reply to this topic.