Move shaders into glsl and hlsl directories
Move `data/shaders` to `data/shaders/glsl` Move `data/hlsl` to `data/shaders/hlsl` Fix up shader paths in the cpp files to point to the new glsl location. `data/shaders/hlsl/compile.py` still overwrites the glsl .spv files (for now). Issue: #723
This commit is contained in:
parent
cac1d2e850
commit
ca884587a4
1043 changed files with 1207 additions and 1201 deletions
|
|
@ -1,31 +0,0 @@
|
|||
import sys
|
||||
import os
|
||||
import glob
|
||||
import subprocess
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
sys.exit("Please provide a target directory")
|
||||
|
||||
if not os.path.exists(sys.argv[1]):
|
||||
sys.exit("%s is not a valid directory" % sys.argv[1])
|
||||
|
||||
path = sys.argv[1]
|
||||
|
||||
shaderfiles = []
|
||||
for exts in ('*.vert', '*.frag', '*.comp', '*.geom', '*.tesc', '*.tese'):
|
||||
shaderfiles.extend(glob.glob(os.path.join(path, exts)))
|
||||
|
||||
failedshaders = []
|
||||
for shaderfile in shaderfiles:
|
||||
print("\n-------- %s --------\n" % shaderfile)
|
||||
if subprocess.call("glslangValidator -V %s -o %s.spv" % (shaderfile, shaderfile), shell=True) != 0:
|
||||
failedshaders.append(shaderfile)
|
||||
|
||||
print("\n-------- Compilation result --------\n")
|
||||
|
||||
if len(failedshaders) == 0:
|
||||
print("SUCCESS: All shaders compiled to SPIR-V")
|
||||
else:
|
||||
print("ERROR: %d shader(s) could not be compiled:\n" % len(failedshaders))
|
||||
for failedshader in failedshaders:
|
||||
print("\t" + failedshader)
|
||||
Loading…
Add table
Add a link
Reference in a new issue