NouVeL/ADVect/shader.py

20 lines
912 B
Python
Raw Normal View History

import subprocess, os
for root, dirs, _ in os.walk('shaders'):
for name in dirs:
subprocess.run(["..\\out\\install\\x64-Debug\\bin\\shaderc", "-f", os.path.join(root, name, name + '.frag'),
"--type", "fragment"
"--platform", "windows",
"--profile", "ps_5_0",
"--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\\dx11\\" + name + ".frag.bin"])
subprocess.run(["..\\out\\install\\x64-Debug\\bin\\shaderc", "-f", os.path.join(root, name, name + '.vert'),
"--type", "vertex"
"--platform", "windows",
"--profile", "vs_5_0",
"--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\\dx11\\" + name + ".vert.bin"])