1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Shader cache key for the material classify compute pass.
use crate::;
/// Cache key for the classify compute pipeline.
///
/// Fields:
/// - `msaa_sample_count` — MSAA matters because the visibility texture
/// is sampled either single- or multisampled; the classify shader
/// only reads sample 0 either way, but the declared binding type
/// has to match.
/// - `bucket_count` — the number of registered buckets (first-party +
/// currently-registered dynamic materials). Since §4a-§4d the classify
/// shader is **identity-independent**: it routes per-pixel/per-sample via
/// the `bucket_lut` storage buffer (not codegen'd per-bucket arms) and
/// sizes its `ClassifyOutput`/`tile_mask` from the count alone — so the
/// shader TEXT is a pure function of `(msaa, bucket_count, emit_edge_data)`
/// and never the bucket *identities*. Keying on the count (not the full
/// entry list) means two registries with the same count but different
/// materials share one compiled classify shader → no recompile on a
/// same-count identity change (§4d recompile reduction).