17 lines
353 B
Bash
Executable File
17 lines
353 B
Bash
Executable File
#!/bin/sh
|
|
WDIR=$HOME/c++/vulkan
|
|
SHADER_DIR=$WDIR/shaders
|
|
SOURCE_DIR=$WDIR/src/shaders
|
|
|
|
mkdir -p "${SHADER_DIR}"
|
|
|
|
for file in $(ls ${SOURCE_DIR}); do
|
|
ext="${file##*.}"
|
|
if [[ $ext == "vert" ]] || [[ $ext == "frag" ]]; then
|
|
echo "compiling ${file}"
|
|
glslc ${SOURCE_DIR}/${file} -o ${SHADER_DIR}/$(basename ${file}).spv
|
|
fi
|
|
done
|
|
|
|
|