Extract standalone Playground SDK source foundation
This commit is contained in:
commit
34ac58b9a2
3567 changed files with 1657902 additions and 0 deletions
35
third_party/SDL3_ttf/examples/testgputext/shaders/build-shaders.sh
vendored
Normal file
35
third_party/SDL3_ttf/examples/testgputext/shaders/build-shaders.sh
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/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 *.vert.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
|
||||
|
||||
for filename in *.frag.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