Pong/resources/shaders/Compile.sh

26 lines
474 B
Bash
Raw Normal View History

2024-07-01 19:55:24 -07:00
#!/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