From dc9ddd618b12e7cadcfaf87bfb42af86f6a00386 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 29 Mar 2026 01:51:21 +0100 Subject: docs(3d): document set_direct_render() in Y-flip rule section --- doc/3D.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/3D.md b/doc/3D.md index dbcd6f9..c468fed 100644 --- a/doc/3D.md +++ b/doc/3D.md @@ -41,6 +41,13 @@ chain, so they must **pre-flip** their geometry to compensate: **Do not** set `m[5] = +t` or use `frontFace = WGPUFrontFace_CCW` (default) in rasterized 3D pipelines — the result will be upside-down with back-faces culled. +**Exception — direct-to-surface rendering** (no post-process chain): call +`renderer.set_direct_render(true)` **before** `renderer.init()`. This selects standard +`WGPUFrontFace_CCW` winding and un-negates Y in the projection matrix, producing a +correct upright image when the output goes straight to the swap-chain surface +(e.g. `test_3d_render`). Effects that feed into the post-process chain must **not** +set this flag. + ## Core Concept Hybrid SDF/rasterization pipeline with physics and collision detection. -- cgit v1.2.3