e5f3636b42
- meshes/cube: procedural checkerboard -> uv_texture.jpg (8x8 UV grid) - meshes/pbr: floor -> ground.jpeg, bump cube -> cave.jpg + caveNormal.jpg (normal map pre-encoded via sRGB OETF to cancel the GPU sRGB decode) - lights/shadow: ground -> ground.jpeg, cube -> uv_texture.jpg - effects/demo: ground -> ground.jpeg, cube -> uv_texture.jpg - effects/fog: ground -> ground.jpeg (tiled 80x80), cubes -> stonewall.jpg - effects/dof: ground -> ground.jpeg, cubes -> uv_texture.jpg - cameras/culling: shared cube mesh -> uv_texture.jpg - add lib/examples/assets/textures/ (19 assets, 6.5 MB) - document assets + usage in examples READMEs, docs/user/examples.md, docs/user/meshes/materials.md (CARGO_MANIFEST_DIR pattern, sRGB caveat)
WSG — User documentation
WSG (WGPU Simple Graphics) is a 3D graphics engine built on top of wgpu and winit. It deliberately provides no scene-graph abstraction: you create resources, place entities, and write the frame loop yourself. The engine handles the rest (GPU context, compilation, command encoding, presentation).
Where to start
- Quickstart — your first window and your first object, in ~30 lines.
- Then, at your pace, pick a topic folder (which mirrors the example folders in
lib/examples/— each page is paired with its examples):
| Folder | Pages |
|---|---|
meshes/ |
Meshes — geometries, entities and Transform · Geometry sources — procedural generators + file import · Materials & textures — the standard shader, unlit mode, textures |
lights/ |
Lights — directional/point/spot/ambient, MAX_LIGHTS · Shadows — shadow mapping · Emissive + Exposure |
cameras/ |
Camera & input — orbital controller, unified input · GPU-driven rendering — culling, LOD |
effects/ |
HDR · Bloom · MSAA · Fog · DoF |
Plus Examples — the 16 examples of the repo in 4 folders, the advanced
manual workflow, and how to add your own example.
The pages are cross-linked: each page ends with links to its related pages.
Design principles
- Explicit over magic: no scene graph, no ECS, no hidden state machine. What you write is what runs.
- The handler drives the loop:
AppHandleris the only required trait (setup,update,render+ optional event hook). - String IDs everywhere: meshes, materials, textures and entities are referenced by label — no integer handles to manage, errors are readable.
- Safe core,
unsafeat the edges: the public API is fully safe;unsafeis confined to the raw-pointer interop layer. - Feature-gated primitives: every primitive and importer behind a Cargo feature
(
prim-cube,import-obj, …) — default isall-prims+import-obj.
Documentation tree
README.md this index (the one you are reading)
quickstart.md the 30-line path to a window + a cube
examples.md the 16 repo examples, the manual workflow, adding your own
meshes/ meshes, geometry sources, materials & textures
lights/ lights, shadows, emissive + exposure
cameras/ camera & input, GPU-driven rendering (culling, LOD)
effects/ HDR, bloom, MSAA, fog, DoF
Links
- Root README
- Technical docs: ARCHI_APP · FRAME_LOOP · ARCHI_CPU_GPU · ARCHI_RENDU
- ROADMAP