Files
wsg/docs/ROADMAP.md
T
Jérôme Bousquié 54a482e354 PBR
2026-09-25 14:40:47 +02:00

97 lines
4.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ROADMAP — WSG
**Vision** : une lib Rust de dessin 3D simple, fondée sur `wgpu`, où l'API utilisateur est
déclarative (graph scène + traits) et où le rendu est **100 % GPU-driven** (indirect draws).
Ce document est la **vue d'ensemble de progression**. Chaque étape a son DRAFT détaillé
(`DRAFT.md`, remplacé à chaque étape) et sa doc livrée (`docs/tech/`, `docs/user/`).
> **Légende** : ✅ fait · 🔶 partiel · ⬜ à faire · ❌ abandonné
> **Principe** : chaque étape est **additive et opt-in** — non-régression structurelle garantie
> (tout reste désactivable, les chemins existants ne changent pas).
---
## Phase 1 — Fondations ✅
| # | Item | Statut |
|---|------|:------:|
| 1.1 | Contexte GPU (Instance, Surface, Adapter, Device, Queue) + boucle winit | ✅ |
| 1.2 | Buffers & Pipeline (vertex buffer, pipeline compilé, fullscreen) | ✅ |
| 1.3 | Geometry (struct `Geometry`, buffers GPU, topologie, `PrimitiveTopology`) | ✅ |
## Phase 2 — Scène & Transforms ✅
| # | Item | Statut |
|---|------|:------:|
| 2.1 | Primitives procédurales (`cube`, `plane`, `sphere`, `cylinder`, `cone`, `torus`) | ✅ |
| 2.2 | Transforms (struct `Transform`, composition translation × rotation × scale) | ✅ |
| 2.3 | Entités & scène (struct `Entity`, `Scene`, `TransformStore`, graph entité→mesh) | ✅ |
| 2.4 | Camera (struct `Camera`, matrices view + perspective, `CameraController` orbital) | ✅ |
## Phase 3 — GPU-driven (cœur de la vision) ✅
| # | Item | Statut |
|---|------|:------:|
| 3.1 | Buffers par entité (Transform + Matrix, uniform par slot) | ✅ |
| 3.2 | Compute matrices (compute shader : transform → world matrix) | ✅ |
| 3.3 | Indirect draws (`draw_args` GPU, `draw_indirect` / `draw_indexed_indirect`) | ✅ |
| 3.4 | Culling GPU (bounding sphere → frustum test → indirect args zéro) | ✅ |
## Phase 4 — Rendu avancé ✅
| # | Item | Statut |
|---|------|:------:|
| 4.1 | Textures & matériaux (struct `Texture`, `Material`, bind groups, shader standard) | ✅ |
| 4.2 | Lighting & ombres (directional + point + spot + ambient, shadow mapping PCF) | ✅ |
| 4.3 | Batching & LOD (batching par matériau, LOD quadric edge collapse + hystérésis) | ✅ |
| 4.4 | **HDR + Tone Mapping** (offscreen `Rgba16Float` + fullscreen TM pass ACES/Reinhard) | ✅ |
## Phase 5 — Qualité & polish ✅
| # | Item | Statut |
|---|------|:------:|
| 5.1 | Exemples (7 examples : hello_triangle → demo) | ✅ |
| 5.2 | Documentation (tech/ + user/ + rustdoc 100 %) | ✅ |
| 5.3 | Tests & robustesse (99 unit + 4 WGSL validation + 3 doctests) | ✅ |
---
## Phase 6 — Post-MVP ⬜
> Au-delà du scope initial. Chaque item est opt-in et indépendant.
| # | Item | Impact visuel | Effort | Statut |
|---|------|:---:|:---:|:---:|
| 6.1 | **Exposure control** (clavier / API live) | ⭐⭐ | Trés faible | ✅ |
| 6.2 | **Emissive materials** (champ `emissive` → bénéficie du HDR) | ⭐⭐⭐ | Faible | ✅ |
| 6.3 | **Bloom** (post-process : downsample → threshold → blur → composite) | ⭐⭐⭐ | Moyen | ✅ |
| 6.4 | **MSAA 4×** (anti-aliasing multi-échantillons + resolve) | ⭐⭐⭐ | Moyen | ✅ |
| 6.5 | **Normal mapping / PBR** (nouveau shader, tangent space, metalness-roughness) | ⭐⭐⭐ | Élevé | ✅ |
| 6.6 | **Cascaded Shadow Maps** (2–3 cascades + blend, plus de précision près de la camera) | ⭐⭐ | Élevé | ⬜ |
| 6.7 | **SSAO** (ambient occlusion screen-space, depth + normal buffer) | ⭐⭐ | Élevé | ⬜ |
| 6.13 | **Fog** (exponential / exponential² / linear, paramètre par scène) | ⭐⭐⭐ | Faible | ✅ |
| 6.14 | **Area lights** (rectangular area light, BRDF approx — specular + diffuse) | ⭐⭐⭐ | Élevé | ⬜ |
| 6.15 | **Textured area lights** (area light avec texture d’émission, e.g. panneaux LED, néons) | ⭐⭐⭐ | Moyen | ⬜ |
| 6.16 | **Volumetric lighting** (god rays / light scattering — radial blur ou ray-march 3D) | ⭐⭐⭐⭐ | Élevé | ⬜ |
| 6.17 | **Depth of field** (post-process CoC : circle-of-confusion + bokeh blur) | ⭐⭐⭐ | Moyen | ✅ |
### Cibles techniques (refactoring)
| # | Item | Statut |
|---|------|:------:|
| 6.8 | Handles typés par ressource (slotmap) — `docs/tech/ARCHI_ARENES.md` | ⬜ |
| 6.9 | API update géométrie par entité (per-frame, sans rebuild complet) | ⬜ |
| 6.10 | Double-buffering des buffers Transform/Matrix (désync CPU/GPU) | ⬜ |
| 6.11 | **Module `mesh`** : primitives en features optionnelles + import (OBJ/gltf) — `math/` supprimé | ✅ |
| 6.12 | **Module `texture`** : génération procédurale (checkerboard, gradient, noise) + formats compressés (KTX2, basis) en features optionnelles | ⬜ |
---
## Liens
- **Prochaine étape** : [DRAFT.md](DRAFT.md) (détail de l'étape en cours, remplacée à chaque itération)
- **Architecture** : [docs/tech/](tech/ARCHI_APP.md)
- **Utilisation** : [docs/user/](user/README.md)
- **Livre de recette** : [docs/PLAN.md](PLAN.md)