26 lines
474 B
Bash
26 lines
474 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
for file in ./*.vert; do
|
||
|
if [ -f "$file" ]; then
|
||
|
filename=$(basename -- "$file")
|
||
|
|
||
|
echo "Compiling vertex shader, ${filename}"
|
||
|
|
||
|
filename="${filename%.*}"
|
||
|
|
||
|
glslangValidator -V "${file}" -o "./${filename}_Vert.spv"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
for file in ./*.frag; do
|
||
|
if [ -f "$file" ]; then
|
||
|
filename=$(basename -- "$file")
|
||
|
|
||
|
echo "Compiling vertex shader, ${filename}"
|
||
|
|
||
|
filename="${filename%.*}"
|
||
|
|
||
|
glslangValidator -V "${file}" -o "./${filename}_Frag.spv"
|
||
|
fi
|
||
|
done
|