Added an example of fullscreen shader effects with the GPU renderer
This commit is contained in:
parent
2aee105b43
commit
96194347bc
11 changed files with 1622 additions and 0 deletions
24
test/build-shaders.sh
Executable file
24
test/build-shaders.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
make-header() {
|
||||
xxd -i "$1" | sed \
|
||||
-e 's/^unsigned /const unsigned /g' \
|
||||
-e 's,^const,static const,' \
|
||||
> "$1.h"
|
||||
}
|
||||
|
||||
# Requires shadercross CLI installed from SDL_shadercross
|
||||
for filename in *.hlsl; do
|
||||
if [ -f "$filename" ]; then
|
||||
shadercross "$filename" -o "${filename/.hlsl/.spv}"
|
||||
make-header "${filename/.hlsl/.spv}"
|
||||
shadercross "$filename" -o "${filename/.hlsl/.msl}"
|
||||
make-header "${filename/.hlsl/.msl}"
|
||||
shadercross "$filename" -o "${filename/.hlsl/.dxil}"
|
||||
make-header "${filename/.hlsl/.dxil}"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f *.spv *.msl *.dxil
|
Loading…
Add table
Add a link
Reference in a new issue