diff options
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. |
