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

23
docs/ASSETS.md Normal file
View File

@@ -0,0 +1,23 @@
**Assets & Paths**
- Default locations
- `assets/` for models/textures and `shaders/` for GLSL live at the repo root.
- The engine autodetects these folders by walking up from the working directory.
- Override root via environment
- Set `VKG_ASSET_ROOT` to a directory containing `assets/` and/or `shaders/`.
- Example: `VKG_ASSET_ROOT=/home/user/vulkan-engine ./bin/vulkan_engine`
- API
- Use `AssetLocator` through `EngineContext::getAssets()` helpers:
- `shaderPath("name.spv")` resolves a shader.
- `assetPath("relative/or/absolute")` resolves runtime assets.
- `modelPath("some.glb")` is an alias for `assetPath`.
- Sample content
- The engine loads `assets/police_office.glb` by default in `VulkanEngine::init()`.
- Ensure this file (and any textures it references) exists under your asset root, or adjust the path used by the sample scene.
- Materials & sRGB
- See `docs/asset_manager.md` for mesh/material creation and sRGB/UNORM handling.