feat: per-preset tone curves via render/art-defaults payload (#32) - #40
Merged
Conversation
This was referenced Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #32 (lever 5).
What
Establishes a per-preset render/art-defaults payload (
RenderArtDefaults) and routes the existingintensity_mappingrender parameter through it — without changing any output.This is deliberately pure plumbing. Every preset's default tone curve stays at the current global log10; tasteful per-preset values are deferred to the showcase-presets issue (#36), which extends this same payload. The point of #32 is the clean render-layer seam that later render levers (#33 palette cycles, #6 gradient modes, #10 glyph selection) plug into without re-plumbing call sites.
Changes
RenderArtDefaults { intensity_mapping }insrc/render_art_defaults.rs, resolved perPresetviaFrom<Preset>+Default(log10 for all presets).--intensity-mappingis nowOption<String>(no clap default) so "absent → per-preset default" is distinguishable from "explicit override". Bare run still resolves to log10.Args::to_render_art_defaults()resolves the per-preset default, overriding only when the flag is explicitly set (mirrors the deposit-curve override pattern).runner.rsstartup + four export/preview paths inapp/mod.rs) read the resolved payload, preserving each site's existing error-handling semantics.intensity_mappingis a render parameter — it stays out ofSimConfig.SavedConfig.intensity_mapping: Option<String>already round-tripped with serde back-compat; untouched.Back-compat proof
UPDATE_GOLDEN).origin/dev;--intensity-mapping lineardiffers from log (override works).Test plan
cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings— clean.cargo test(805 lib + 5 cli_integration + 47 visual_regression + 19 integration_app) — green.cargo test --all-features --lib(816) — green.