From f7609d0bdc3df851195c378eabc2715cb4c30bbe Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 3 Feb 2026 07:51:30 +0100 Subject: 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. --- doc/ASSET_SYSTEM.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/ASSET_SYSTEM.md') 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`. -- cgit v1.2.3