When generating OSL some secondary functions are introduced which don't seem to be considered when setting the option to try and generate unique function names. The following is an example generated:
Some of the shader functions have been overridden but functions with generic names like max(). pow() and names like __operator__add__ as well as include declarations means there can be name clashes and multiple identical includes when trying to insert more than one transform function into a larger OSL shader.
It is possible to post rename them, but wondering if there is a way to handle this so it's either reusable (allow for a seperate "common" source code" API access, or make the renaming logic also rename these functions.
When generating OSL some secondary functions are introduced which don't seem to be considered when setting the option to try and generate unique function names. The following is an example generated:
Some of the shader functions have been overridden but functions with generic names like
max()
.pow()
and names like__operator__add__
as well as include declarations means there can be name clashes and multiple identical includes when trying to insert more than one transform function into a larger OSL shader.It is possible to post rename them, but wondering if there is a way to handle this so it's either reusable (allow for a seperate "common" source code" API access, or make the renaming logic also rename these functions.