diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-08 10:13:35 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-08 10:13:35 +0100 |
| commit | f90adb82e510a6d8ba98272c2352d24dd06a1997 (patch) | |
| tree | 233b0fb9b81ecc1638b3be0135d8b4abc085f4df /doc/ASSET_SYSTEM.md | |
| parent | 1438cfe727adc7b6a5d84c76b0878ed77ef254a8 (diff) | |
docs: update ASSET_SYSTEM.md for WGSL disk-load in dev mode
WGSL shaders now join SPEC/MP3 in being loaded from disk in development
mode, enabling shader iteration without rebuild.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'doc/ASSET_SYSTEM.md')
| -rw-r--r-- | doc/ASSET_SYSTEM.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/ASSET_SYSTEM.md b/doc/ASSET_SYSTEM.md index 87d2a9a..a97886c 100644 --- a/doc/ASSET_SYSTEM.md +++ b/doc/ASSET_SYSTEM.md @@ -31,10 +31,10 @@ The `ASSET_TYPE` field explicitly defines how the asset is processed and used at The asset system operates in two modes, controlled by the `DEMO_STRIP_ALL` CMake flag: 1. **Development Mode (`DEMO_STRIP_ALL=OFF`)**: - * Heavy assets (`SPEC`, `MP3`) are **loaded from disk** at runtime. + * `WGSL`, `SPEC`, and `MP3` assets are **loaded from disk** at runtime. * The `asset_packer` generates a C-string containing the file path for these assets. * The `AssetManager` reads the file on first access, caches it, and returns the content. - * This mode allows for rapid iteration on audio assets without requiring a full recompile. + * This mode allows for rapid iteration on shaders and audio without requiring a full recompile. 2. **Release Mode (`DEMO_STRIP_ALL=ON`)**: * All assets are **embedded directly into the binary** as `const` byte arrays. @@ -84,7 +84,7 @@ AssetType t = GetAssetType(AssetId::MY_ASSET); Tool: `tools/asset_packer.cc` 1. Parse workspace `assets.txt`. -2. If in **Development Mode**, for `SPEC` and `MP3` assets, it generates a C-string with the file path. +2. If in **Development Mode**, for `WGSL`, `SPEC`, and `MP3` assets, it generates a C-string with the file path. 3. If in **Release Mode**, it reads and processes all files into byte arrays (images → RGBA8, meshes → vertex/index, etc.). 4. Generate `src/generated/assets.h` (enum + declarations). 5. Generate `src/generated/assets_data.cc` (byte arrays/paths + `AssetRecord` table). @@ -108,4 +108,4 @@ MY_KICK, SPEC, music/my_kick.spec, "Description" MY_SHADER, WGSL, shaders/my_shader.wgsl, "Description" ``` -Rebuild: `cmake --build build -j4` — CMake detects manifest changes automatically. In development mode, changes to `.spec` or `.mp3` files do not require a rebuild. +Rebuild: `cmake --build build -j4` — CMake detects manifest changes automatically. In development mode, changes to `.wgsl`, `.spec`, or `.mp3` files do not require a rebuild. |
