Introduced a WIP standalone binary tool, "LibsToOso", allowing us to codegen and compile MaterialX libraries, as part as the ongoing work towards a new shader generator, "MaterialXGenOslNodes"#1
Open
JoshuaSenouf wants to merge 3 commits intodevdays-2025-spifrom
Conversation
ld-kerley
reviewed
Sep 26, 2025
ld-kerley
left a comment
There was a problem hiding this comment.
Looks pretty good to me - I think ChrisH will want to drop his shader generator in to the same source/MaterialXGenOslNodes module - and bundle the tool and the new generator together.
ld-kerley
reviewed
Sep 26, 2025
ef932cd to
f3c3cbc
Compare
f3c3cbc to
6be84e8
Compare
…codegen and compile MaterialX libraries, as part as the ongoing work towards a new shader generator, "MaterialXGenOslNodes".
…th", with the latter being optional, so we can split where we are codegening and compiling our shaders.
ba0e932 to
a37b8cf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It will build a new executable,
MaterialXGenOslNodes_LibsToOso, inside thebininstall directory in your install location.Both the naming of the tool and its install location are likely going to change, obviously.
It can be used like so:
MaterialXGenOslNodes_LibsToOso --outputPath /path/to/my/output/dir --oslCompilerPath /path/to/my/oslc --oslIncludePath /path/to/my/osl/includeThis alone will codegen and compile all the MaterialX
NodeDefwith a valid OSL implementation found in all the libraries in the provided output directory.The
--outputPath,--oslCompilerPathand--oslIncludePatharguments are all mandatory for the tool to work, and they will be checked for both presence and validity (to a degree).It is also possible to specify a couple of optional arguments, such as:
--libraries, that allows to specify the comma separated MaterialX libraries we want to process instead of everything, such asstdlib,pbrlib.--prefix, that allows adding a prefix to both the filename of a shader, as well as the shader function itself in OSL.