Can I preprocess shader properties?

I have a custom shader with various float properties. To be artist friendly I want most of them to be linear values between 0 and 1. However, in my shader the actual values I want will in some cases be non-linear and have a different range.

Is there a way to preprocess or “init” these before they are sent to the shader? Like a property filter. Seems kind of wasteful to perform these transformations inside the shader when they could just as well be changed before they are even passed to the shader.

I have the same question.

1 Answer

1

Something like this?

http://docs.unity3d.com/Documentation/Components/SL-CustomMaterialEditors.html

Thanks. That will do it.