2022-10-07 23:30:44 +02:00
|
|
|
#!/bin/sh
|
|
|
|
WDIR=$HOME/c++/vulkan
|
2022-10-27 00:53:40 +02:00
|
|
|
SHADER_DIR=$WDIR/shaders
|
|
|
|
SOURCE_DIR=$WDIR/src/shaders
|
2022-10-07 23:30:44 +02:00
|
|
|
|
2022-10-27 00:53:40 +02:00
|
|
|
mkdir -p "${SHADER_DIR}"
|
2022-10-07 23:30:44 +02:00
|
|
|
|
2022-10-27 00:53:40 +02:00
|
|
|
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
|
2022-10-07 23:30:44 +02:00
|
|
|
|
|
|
|
|