ShaderGen and MaterialXView


ShaderGen is a dynamic shader generation system that can build and compile complete OSL or GLSL shaders from MaterialX nodegraphs. A key component of ShaderGen is a set of Physically Based Shading nodes, which can be used in conjunction with Standard Library nodes to create complex layered energy-conserving surface, volume and emissive shaders for offline or realtime/viewport rendering.

For much more information about ShaderGen components and how ShaderGen works, please see the ShaderGeneration page on the MaterialX GitHub.

MaterialX Viewer

Complementing ShaderGen is a simple standalone Viewer application for MaterialX content. MaterialXView uses ShaderGen with a NanoGUI interface to build GLSL shaders of MaterialX nodegraphs, which can be bound with a selected MaterialX material and applied to geometry defined in .obj format; standard geometries including a sphere, teapot and cutaway shaderball object are included in the distribution, as are a number of example materials based on the StandardSurface shader.

MaterialX can also be compiled to JavaScript for Web usage. ShaderGen can generate GLSL ES shaders for WebGL rendering. An example MaterialX Web Viewer is hosted here