EDIT: Docs and minor bug fixed

This commit is contained in:
2025-10-29 22:51:28 +09:00
parent 97177dade3
commit 0226c0b5b3
26 changed files with 348 additions and 17 deletions

38
docs/BUILD.md Normal file
View File

@@ -0,0 +1,38 @@
**Build & Environment**
- Prerequisites
- Vulkan SDK installed and `VULKAN_SDK` set.
- A C++20 compiler and CMake ≥ 3.8.
- GPU drivers with Vulkan 1.2+.
- Configure
- `cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug`
- Re-run configure after toolchain or dependency changes.
- Build (single-config)
- `cmake --build build --target vulkan_engine`
- Build (multi-config, e.g., MSVC)
- `cmake --build build --config Release`
- Run
- `./bin/vulkan_engine` (Linux/macOS)
- `bin/vulkan_engine.exe` (Windows)
- Shaders
- CMake compiles GLSL via `glslangValidator` to SPIRV targeting Vulkan 1.2:
- Files under `shaders/*.vert|*.frag|*.comp` are rebuilt on `cmake --build`.
- Windows helper: `./compile_shaders.ps1` uses `glslc` with `--target-env=vulkan1.3` and supports additional stages (mesh/task/ray tracing).
- Ensure `glslangValidator`/`glslc` is on `PATH`. See `docs/SHADERS.md`.
- Windows SDK note
- `CMakeLists.txt` includes a default SDK path for Windows `1.3.296.0`:
- Update the path or set `VULKAN_SDK` accordingly if your version differs.
- Thirdparty deps
- Vendored under `third_party/` and brought in via CMake. Do not edit headers directly; update through targets.
- Validation Layers
- Enabled in Debug (`kUseValidationLayers = true` in `src/core/config.h`).
- Disable by building Release or toggling the flag during local experimentation.