Improved shaderwriter.py