import subprocess, os plats = [ { 'location': 'glsl', 'frag': '140', 'vert': '140' }, { 'location': 'dx11', 'frag': 'ps_5_0', 'vert': 'vs_5_0' }, { 'location': 'spirv', 'frag': 'spirv', 'vert': 'spirv' } ] for root, dirs, _ in os.walk('shaders'): for name in dirs: for config in plats: subprocess.run(["..\\out\\install\\x64-Debug\\bin\\shaderc", "-f", os.path.join(root, name, name + '.frag'), "--type", "fragment" "--platform", "windows", "--profile", config['frag'], "--varyingdef", os.path.join(root, name, "varying.def.sc"), "-i", "ext\\bgfx\\bgfx\\examples\\common", "-i", "ext\\bgfx\\bgfx\\src", "-o", "..\\out\\build\\x64-Debug\\ADVect\\shaders\\" + config['location'] + "\\" + name + ".frag.bin"]) subprocess.run(["..\\out\\install\\x64-Debug\\bin\\shaderc", "-f", os.path.join(root, name, name + '.vert'), "--type", "vertex" "--platform", "windows", "--profile", config['vert'], "--varyingdef", os.path.join(root, name, "varying.def.sc"), "-i", "ext\\bgfx\\bgfx\\examples\\common", "-i", "ext\\bgfx\\bgfx\\src", "-o", "..\\out\\build\\x64-Debug\\ADVect\\shaders\\" + config['location'] + "\\" + name + ".vert.bin"])