summaryrefslogtreecommitdiff
path: root/doc/ASSET_SYSTEM.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-03 07:51:30 +0100
committerskal <pascal.massimino@gmail.com>2026-02-03 07:51:30 +0100
commitf7609d0bdc3df851195c378eabc2715cb4c30bbe (patch)
treec5137afca022caad71e79ddc630e277d22256aca /doc/ASSET_SYSTEM.md
parent7204ac562575b03e2709068531d47f87ff7229de (diff)
docs: Plan Shader Asset Integration (Task #24)
Updates ASSET_SYSTEM.md to describe shader asset handling. Adds Task #24 to TODO.md and PROJECT_CONTEXT.md to extract hardcoded shaders and integrate them with the AssetManager and ShaderComposer.
Diffstat (limited to 'doc/ASSET_SYSTEM.md')
-rw-r--r--doc/ASSET_SYSTEM.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/ASSET_SYSTEM.md b/doc/ASSET_SYSTEM.md
index 250be07..bd5a266 100644
--- a/doc/ASSET_SYSTEM.md
+++ b/doc/ASSET_SYSTEM.md
@@ -55,3 +55,14 @@ we need a simple tool that:
* generates the assets_data.cc file with all the data
* put these in the source tree
* this process needs a script for automation
+
+# Shader Snippets
+
+Shader code (WGSL) can also be managed as assets.
+1. Create `.wgsl` files in `assets/final/shaders/` (or similar).
+2. Add them to `assets/final/demo_assets.txt` with compression `NONE`.
+ Example: `SHADER_COMMON, shaders/common.wgsl, NONE`
+3. In C++, retrieve them using `GetAsset()`. Since they are binary blobs,
+ construct a `std::string` or `std::string_view` using the returned pointer
+ and size.
+4. Register them with the `ShaderComposer`.