MaterialX
MaterialX copied to clipboard
Suggestion: Reduce unit test size for standard library
Currently there are a lot of unit tests which are run for every code gen variant for shader generation and rendering tests.
Many of these are "trivial" and can be replaced by create an instance of that node and a downstream connection to a material node. Any upstream values can be tweaked to make them run properly (such as layering and math nodes in the pbr library).
The following is a preliminary script which uses the convert-to-material utilities under review in: https://github.com/AcademySoftwareFoundation/MaterialX/pull/1205, which has a dump of GLSL and OSL runs.
Something like this could be run to generate 1 or more source files for testing.
Tests that it would not replace would be anything requiring specific resource bindings (including images, geometry streams, units and color management), material assignments and "materials" examples, and node connectivity.