Alex Dixon

Gamedev, graphics, open source. Shuffling bytes and swizzling vectors since 2004...

pmfx-shader

Cross platform shader system.

This cross platform shader system originated in pmtech but is now also being used in the engine I am currently developing at Flavourworks. It is written in python and provides a command-line interface to configure and build shaders for different platforms.

It uses a mixture of pre-processor macros and code generation to target HLSL, Metal, GLSL and SPIR-V and comes with shader compilers and validators built in to support byte-code/intermediate representations as well as being able to output platform specific shader source for each language.

In addition to allowing a single unified language to target different platforms, pmfx-shader also adds useful features such as techniques, uber-shader permutations, reflection and c++ code generation to aid fast development, code sharing and data-driven configurability.

GitHub