This folder contains the standard data libraries for MaterialX, providing declarations and graph definitions for the MaterialX nodes, and source code for all supported shader generators.
- stdlib
- stdlib_defs.mtlx : Nodedef declarations.
- stdlib_ng.mtlx : Nodegraph definitions.
- genglsl: GLSL language support.
- lib : Shader utility files.
- stdlib_genglsl_impl.mtlx : Mapping from declarations to implementations.
- stdlib_genglsl_cm_impl.mtlx : Minimal set of "default" color management implementations.
- stdlib_genglsl_unit_impl.mtlx : Real world unit support implementations.
- GLSL implementation files.
- genosl: OSL language support.
- lib: Shader utility files.
- stdlib_genosl_impl.mtlx : Mapping from declarations to implementations.
- stdlib_genosl_cm_impl.mtlx : Minimal set of "default" color management implementations.
- stdlib_genosl_unit_impl.mtlx : Real world unit support implementations.
- OSL implementation files.
- osl: OSL reference implementations.
- These are the original OSL reference implementations from MaterialX v1.35, and will be replaced with generated OSL code in the future.
- genmdl: MDL language support.
- stdlib_genmdl_impl.mtlx : Mapping from declarations to implementations.
- stdlib_genmdl_cm_impl.mtlx : Minimal set of "default" color management implementations.
- stdlib_genmdl_unit_impl.mtlx : Real world unit support implementations.
- pbrlib
- pbrlib_defs.mtlx : Nodedef declarations.
- pbrlib_ng.mtlx : Nodegraph definitions.
- genglsl : GLSL language support
- lib : Shader utility files.
- pbrlib_genglsl_impl.mtlx : Mapping from declarations to implementations.
- GLSL implementation files.
- genosl : OSL language support
- lib : Utilities
- pbrlib_genosl_impl.mtlx : Mapping from declarations to implementations.
- OSL implementation files.
- genmdl : MDL language support
- pbrlib_genmdl_impl.mtlx : Mapping from declarations to implementations.
- Note: MDL implementation files are in a "package" folder found under source/MaterialXGenMdl/mdl/materialx
- bxdf
- standard_surface.mtlx : Graph definition of the Autodesk Standard Surface shading model.
- usd_preview_surface.mtlx : Graph definition of the UsdPreviewSurface shading model.
- lama : Graph definitions of the MaterialX Lama node set.
- Each target implementation requires a target definition for declaration / implementation correspondence to work.
- The targets folder contains definition files for the following core targets:
- GLSL :
genglsl
- OSL :
genosl
- MDL :
genmdl
- GLSL :
- Any additional target files should be added under this folder and loaded in as required.
- GLSL target support is for version 4.0 or higher.
- OSL target support is for version 1.9.10 or higher.
- MDL target support is for version 1.6.
- "Default" color management support includes OSL, GLSL, and MDL implementations for the following non-LUT transforms:
- lin_rec709, gamma18, gamma22, gamma24, acescg, g22_ap1, srgb_texture
- Basic GLSL
lightshader
node definitions and implementations are provided for the following light types:- point, directional, spot
- Code generation does not currently support:
ambientocclusion
node.arrayappend
node.curveadjust
node.displacementshader
andvolumeshader
nodes and associated operations (add
,multiply
,mix
) for GLSL targets.