Hey Epic,
We are planning to define our internal material authoring workflow. In doing so we’ve found one possible way of handling materials which is by creating one material function for each platform
target. We then use static switches to select the right material function given the platform target we want the material to be compiled for.
What we’d like to do is specify the static switches at packaging time (rather than authoring time on the material instance params). So, in this way, we can automate/streamline the process much better.
Do you think this approach can be feasible or is there another, much better way, of handling multiplatform material workflow? Plus, how other companies handle this?
It would be useful to be able to organize the master material with per platform material functions so we can compile just the sub-portion of shader code for a given platform excluding the others, resulting in a more maintainable material.
Last but not least: Another approach would be to have a master for each platform (rather than a master containing a material function for each platforrm selected via static switches).
Are we on the right path? What would you suggest? (we are pending toward the material functions approach)
Recap:
- Per platforrm Material functions + static switches approach
- A single master material for each platforrm
Looking forward to your reply,
Thanks in advance,
Fabio