Skip to content

Manual: shadow mapping and six more chapters - #245

Merged
schell merged 8 commits into
mainfrom
docs-missing-manual-buildout
Sep 23, 2026
Merged

schell merged 8 commits into
mainfrom
docs-missing-manual-buildout

Conversation

@schell

@schell schell commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Adds 7 manual chapters plus polish. The manual goes from 9 to 16 pages. Every chapter is backed by a verified example in crates/examples/src (17 tests, all passing) with in-test visual assertions, not just prose.

New chapters

  • Shadow mapping - Stage::new_shadow_map, per-frame updates, bias/PCF tuning, tips
  • Materials & textures - albedo factors, the atlas, PBR params, runtime updates, normal maps
  • Post-processing - bloom, exposure, all tonemapping operators
  • Debug modes - all 19 DebugChannels grouped by purpose; overlay documented with a caveat
  • Scene hierarchy - NestedTransform, parents moving subtrees, local vs global
  • Animation - Animator playback, hand-built morph targets; skinning documented with a caveat
  • Performance - frustum/occlusion culling, light tiling, MSAA

Tooling

  • Manual switched from mdbook-environment (breaks on mdbook 0.5) to maintained mdbook-variables, same {{DOCS_URL}} env flow
  • New public Stage::tonemapping() accessor - userland previously had no way to configure exposure or the tone mapping algorithm

Bugs found while writing the docs (filed, not fixed here)

Verification

  • Every example asserts its visual effect in-test (pixel diffs, unique color counts)
  • mdbook build: 0 errors, all includes/links/images resolved, chapters present in toc/print/search
  • Examples suite 17/17, clippy clean, cargo +nightly fmt clean

mdbook-environment 0.0.4 is incompatible with mdbook 0.5's preprocessor protocol. mdbook-variables (0.4.1) is maintained and provides the same {{VARIABLE}} substitution via use_env, keeping the DOCS_URL environment variable flow used by cargo xtask manual.
The Tonemapping field was pub(crate), leaving userland no way to configure exposure or the tone mapping algorithm.
…ters

- lighting/shadow-mapping.md: Stage::new_shadow_map, per-frame shadow map updates, bias/PCF tuning, point-light notes
- material.md: albedo factors, the texture atlas, PBR parameters, runtime updates, emissive color, normal maps
- postprocessing.md: the HDR pipeline, bloom, exposure, and the tonemapping operators

Each chapter is backed by a verified example in crates/examples/src and screenshots generated by tests.

Note: Stage::set_images must be called before the first render for textures to apply - see issue #241.
Documents Stage::set_debug_mode with all nineteen DebugChannel variants grouped by purpose, with normals/UV/albedo screenshots of the shadow-mapping scene, plus the debug overlay with a caveat: it currently renders nothing (issue #243) and silently no-ops under direct drawing.

The overlay step is omitted from the example because the feature produces no visible output today.
Documents NestedTransform: building parent/child graphs with local transforms, attaching primitives via with_transform, moving the parent to move the subtree, and moving a child independently. Notes on local vs global descriptors, eager global updates, remove_child/parent, and when to prefer a plain Transform.
Documents GLTF animation playback with the Animator (clips advance per frame and wrap automatically), hand-built morph targets with runtime weight updates, and skins - which are documented with a caveat: vertex skinning currently produces no visible effect even with posed joints (issue #244).

The example omits a skinning demo for that reason; the crate's rigged_fox test never asserted a visual difference (no skinned baseline was ever committed).
Documents frustum culling (default on, output proven byte-identical when toggled), occlusion culling (off by default, in development), light tiling with the LightTilingConfig knobs and lux guidance, and MSAA. The tiling demo shows a 36-light scene rendering identically with tiling - pure savings.
Adds an ambient light section to the analytical lights chapter (global constant contribution, RGB + intensity, fills shadows), and fixes the dead '[the manual](#todo)' link in the crate docs to point at https://renderling.xyz/manual/index.html. reflinks gains the ambient color accessors.
@schell
schell merged commit 46bf54c into main Sep 23, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant