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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! `indicatrix` is a physically-based spectral gemstone renderer.
//!
//! Turns GemCAD-style cutting instructions (facet angles and index positions)
//! into rendered output: spectral analytical / Monte-Carlo raytracing through
//! faceted gemstone geometry, plus brilliance / fire / scintillation metrics.
//!
//! No UI toolkit or data-source dependency: callers supply plain
//! [`FacetSpec`] rows (or hand-built [`geometry::GpuFacetPlane`] sets) and a
//! [`optics::materials::GemMaterial`], and get back pixels and/or metrics.
// `wgpu`'s type nesting overflows the default recursion limit when proving
// `Send` for the closure `renderer::gpu::hybrid` spawns onto a scoped thread.
// 256 clears current nesting with headroom; raise only if a future `wgpu`
// upgrade nests deeper.
/// color science: CIE 1931 color matching, gamut mapping, tone mapping, and the
/// brilliance/fire/scintillation optical metrics.
/// Faceted gemstone solid geometry: the plane-arrangement B-rep, standard cut
/// tables, girdle classification, and the meet-point solver.
/// Physically-based optics: materials, dispersion, birefringence, polarization, and
/// the spectral raytracer itself.
/// Pure render-setup helpers shared by every renderer built on this crate.
///
/// Material resolution and overrides, the backdrop mapping, plane-set identity,
/// girdle-width measurement, ICC/PNG export encoding, and the samples-slider exponent
/// mapping -- see this module's own doc comment.
/// CPU and (behind the `gpu` feature) GPU rendering backends, buffer encoding,
/// denoising, and tone mapping.
/// SIMD-accelerated plane-arena intersection kernels shared by the CPU raytracer.
pub use FacetSpec;
/// Build identity used by `indicatrix-net`'s handshake: 16 lowercase hex chars, the
/// 64-bit FNV-1a hash of this crate's version string.
///
/// Keyed on the version so a worker and a viewer built from the same release pair
/// across platforms and checkouts. The physics-parity guarantee this handshake
/// exists for (two implementations summed together render a plausible wrong image)
/// therefore depends on the release rule: bump the version whenever anything under
/// `src/` that affects a traced sample changes. Compare [`SOURCE_HASH`] when in doubt.
pub const BUILD_ID: &str = env!;
/// This crate's version, as the handshake identity is derived from it.
pub const VERSION: &str = env!;
/// Deterministic content hash of this crate's source tree.
///
/// Covers `src/**/*.rs`, `src/**/*.wgsl` and `Cargo.toml`; 16 lowercase hex chars,
/// stable across OS, toolchain, line endings and `.git` state for byte-identical
/// source. Catches a physics-affecting edit that didn't bump [`VERSION`] (which
/// [`BUILD_ID`] is keyed on, and [`BUILD_ID`] disagreeing is always a hard handshake
/// refusal): `indicatrix_net::handshake::verify_compatible` sends this value on both
/// sides and, when BOTH sides could establish their own hash, a disagreement is
/// ALSO a hard refusal (`Incompatible::SourceHash`) -- not a diagnostic-only field.
/// When either side's hash is unknown (e.g. a build that skipped this crate's
/// `build.rs` hashing step), that side's check is skipped and logged at `warn!`
/// instead, since an unknown hash is not itself evidence of a mismatch; see that
/// module's own doc comment for the full two-tier rationale.
pub const SOURCE_HASH: &str = env!;