From b2db12e6379e30cdcc1ad551172251f4bc41d2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Bousqui=C3=A9?= Date: Sat, 19 Sep 2026 21:15:52 +0200 Subject: [PATCH] =?UTF-8?q?docs(draft):=20correct=20=C3=89tape=2014=20arch?= =?UTF-8?q?ived=20bilan=20(LessEqual,=20static=20cube,=20visibility=20fix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/DRAFT.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/DRAFT.md b/docs/DRAFT.md index 59ebea4..cb4629c 100644 --- a/docs/DRAFT.md +++ b/docs/DRAFT.md @@ -7,15 +7,17 @@ > Ombres portées classiques en **deux passes** sur une lumière unique (directionnelle **ou** spot), > choisie par `Scene::set_shadow_caster(index)` (D1). Le `Renderer` possède désormais la shadow map > (1024², `Depth32Float`, `RENDER_ATTACHMENT | TEXTURE_BINDING`), le sampler **comparateur** -> (`GreaterEqual`, WebGPU NDC [0,1]), le bind group **@3** (sampler + texture), un buffer uniform +> (`LessEqual`, WebGPU NDC [0,1]), le bind group **@3** (sampler + texture), un buffer uniform > `light_view_proj` + sa bind group, et une **pipeline depth-only** (`shadow_shader.wgsl` + bias > slope-scaled) — tout alloué dans `Renderer::new`, comme la depth texture de scène (D2/D4). > `render_scene` exécute d'abord `render_shadow_map` (même `CommandEncoder`), puis la passe principale > échantillonne la map via **PCF 3×3** dans `standard_shader.wgsl` (l'ombre ne touche pas l'ambiant). > `FrameUniforms` est passé de 704 à 784 octets (`shadow_light_index`, `light_view_proj`, `shadow_params`). > Ombres **éteintes par défaut** (indice sentinelle `MAX_LIGHTS`) → non-régression des exemples -> `simple`/`cube`/`manual`/`spot_test`. Exemple `shadow_test` : cube tournant projetant une ombre sur -> un sol. Commit-log : `c2cbd7f` (impl), `39167ee` (comparateur), `67bd7af` (direction directionnelle), -> `9a51ff7` (test : clip depth WebGPU + NdotL). +> `simple`/`cube`/`manual`/`spot_test`. Exemple `shadow_test` : cube projetant une ombre douce sur +> un sol (lumière avant-droite basse, `toward_light (1.0, 0.5, 0.0)` — ombre visible). Commit-log : +> `c2cbd7f` (impl), `39167ee` (comparateur), `67bd7af` (direction directionnelle), +> `9a51ff7` (test : clip depth WebGPU + NdotL), `ab13fa7` (fix visibilité : réapplique `LessEqual` +> + lumière réglée après probe offscreen — ombre invisible car trop raide/occultée par le cube). > > Source de vérité = code + README.md. Ce document est vidé à la complétion de chaque étape.