diff options
| author | hachem <im@hachem.wtf> | 2026-08-20 02:27:02 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-20 02:40:07 +0200 |
| commit | 5b361d81dbd2af0d0e99b9eb1adebea76ff05db0 (patch) | |
| tree | 34db1df17e8c7248aeeb92156d635d31c2484e3f /Tools | |
| parent | e3abaaf59777258ba06705135a0cafcb5918ad12 (diff) | |
[chore]: MASSIVE refactor + more vulkan bs
Diffstat (limited to 'Tools')
| -rwxr-xr-x | Tools/compile-shaders.sh | 10 | ||||
| -rwxr-xr-x | Tools/fetch-slang.sh | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Tools/compile-shaders.sh b/Tools/compile-shaders.sh index ea1aa15..1f58c2a 100755 --- a/Tools/compile-shaders.sh +++ b/Tools/compile-shaders.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# Compiles every Assets/Shaders/*.slang to all backend targets, into -# Assets/Shaders/generated/ (gitignored): +# Compiles every assets/shaders/*.slang to all backend targets, into +# assets/shaders/generated/ (gitignored): # # OpenGL : <name>.glsl - combined "#type" GLSL 4.10 (Slang -> SPIR-V -> # SPIRV-Cross), macOS-4.1-core valid, loaded by @@ -14,12 +14,12 @@ set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" -SLANGC="${SLANGC:-$ROOT/Tools/slang/bin/slangc}" +SLANGC="${SLANGC:-$ROOT/tools/slang/bin/slangc}" SPIRV_CROSS="${SPIRV_CROSS:-$(command -v spirv-cross || echo spirv-cross)}" -SRC="$ROOT/Assets/Shaders" +SRC="$ROOT/assets/Shaders" OUT="$SRC/generated" -[ -x "$SLANGC" ] || { echo "compile-shaders: slangc not found at $SLANGC (run Tools/fetch-slang.sh)"; exit 1; } +[ -x "$SLANGC" ] || { echo "compile-shaders: slangc not found at $SLANGC (run tools/fetch-slang.sh)"; exit 1; } command -v "$SPIRV_CROSS" >/dev/null 2>&1 || { echo "compile-shaders: spirv-cross not found (brew install spirv-cross)"; exit 1; } mkdir -p "$OUT" diff --git a/Tools/fetch-slang.sh b/Tools/fetch-slang.sh index 5ee6de5..5229bf7 100755 --- a/Tools/fetch-slang.sh +++ b/Tools/fetch-slang.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash # -# Fetches the Slang shader-compiler toolchain into Tools/slang (gitignored). +# Fetches the Slang shader-compiler toolchain into tools/slang (gitignored). # Slang is the single shader-authoring language for Donut; slangc cross-compiles -# each Assets/Shaders/*.slang to GLSL (OpenGL), SPIR-V (Vulkan), and MSL (Metal). +# each assets/shaders/*.slang to GLSL (OpenGL), SPIR-V (Vulkan), and MSL (Metal). # # Re-run to (re)install. Pin the version here so builds are reproducible. set -euo pipefail VERSION="2026.14.1" ROOT="$(cd "$(dirname "$0")/.." && pwd)" -DEST="$ROOT/Tools/slang" +DEST="$ROOT/tools/slang" case "$(uname -s)-$(uname -m)" in Darwin-arm64|Darwin-aarch64) ASSET="macos-aarch64" ;; |
