A mask layer holds a real develop chain, so the develop panel can edit one with no new controls: select a layer and the same sliders read and write its chain instead of the graph's. An operation declared in `ops/` tomorrow becomes locally adjustable by existing, which is the payoff for making a layer a chain rather than a handful of special-cased parameters. `segmentation.rs` joins the two arms into the one thing the view needs. The model reads the image through a neutral graph rather than the edited one, so a segmentation survives an exposure change instead of being invalidated by every slider. Arm B failing is not fatal: a missing or unreadable model leaves a working watershed map, because refusing to segment at all would trade a working feature for a strict one. The overlay colours groups by a golden-angle walk over hue. Deterministic rather than random, so a region keeps its colour across a level change and the eye can track it; boundaries drawn black over the fill, because two adjacent groups landing on near hues read as one region and telling them apart is the whole reason to look at it. Clicking the photograph creates the layer if none is selected — that is how a local adjustment begins, and making the user press "add layer" first would be a step with no decision in it. Shift-click extends, and clicking a region already selected removes it, so one gesture both adds and corrects. `segment-readback` is a new dr-gpu feature and not a loosening of `readback`. The region-graph transfer is once per image on a worker; the one AC-8 forbids is per frame in the render loop. Sharing a switch would have forced a build wanting local masking to unlock the other. F3 still stands and the feature name says so.
52 lines
1.6 KiB
TOML
52 lines
1.6 KiB
TOML
[package]
|
|
name = "dr-gpu"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
dr-types.workspace = true
|
|
dr-decode.workspace = true
|
|
dr-pipeline.workspace = true
|
|
# The watershed's pixel passes are here because they are shaders; everything
|
|
# that reasons about regions rather than pixels lives there, where it is
|
|
# testable with no adapter present. No features: this half needs neither the
|
|
# inference runtime nor the weights, and the workspace declaration defaults
|
|
# them off so that stays true.
|
|
dr-segment.workspace = true
|
|
wgpu.workspace = true
|
|
thiserror.workspace = true
|
|
log.workspace = true
|
|
bytemuck.workspace = true
|
|
# Needed outside tests: shader compilation errors are collected through an
|
|
# async error scope, which must be resolved before the pipeline is returned.
|
|
pollster.workspace = true
|
|
|
|
[dev-dependencies]
|
|
env_logger.workspace = true
|
|
|
|
[[example]]
|
|
name = "bench"
|
|
required-features = ["readback"]
|
|
|
|
[[example]]
|
|
name = "develop"
|
|
# No `readback` needed since S1: this writes a file, so it goes through
|
|
# `export_pixels`, which is ungated precisely because an export is not the
|
|
# round-trip AC-8 forbids.
|
|
|
|
[features]
|
|
default = []
|
|
# Exposes read_pixels outside tests. Production must not enable this.
|
|
readback = []
|
|
# Exposes `Segmentation::read_field`, which builds the region adjacency graph
|
|
# on the CPU. Separate from `readback` on purpose — see `segment.rs`. Once per
|
|
# image on a worker, not the per-frame display round-trip AC-8 forbids; still a
|
|
# full-resolution transfer, and still F3's open gap.
|
|
segment-readback = []
|
|
|
|
[[example]]
|
|
name = "segment"
|
|
required-features = ["segment-readback"]
|