qualia_core_db/render/mod.rs
1//! Renderer / engine — the manifold projection + WebGPU viewport.
2//!
3//! Phase 0.2a (`RENDERER_IMPLEMENTATION_PLAN.md`): the formerly-flat `portal_*` modules are
4//! consolidated under one `render` tree. The platform-agnostic pieces (camera, PGA oracle,
5//! projection, telemetry, standpoint, spectral, acoustic, control, contract, asset import) compile
6//! everywhere. The WebGPU renderer core (`gpu`) compiles wherever `gpu-runtime` is enabled; only
7//! the browser facade (`portal`, `portal_wasm`) remains gated to wasm + `portal`.
8
9pub mod acoustic;
10/// Browser Anatomy render backends. Shared pack metadata remains in `anatomy_pack`.
11pub mod anatomy;
12/// Person-authored body fit applied to decoded organ vertices (CCF space).
13pub mod body_fit;
14/// Shared metadata schema for a `.hmc` anatomy asset pack (per-organ system /
15/// position / neutral colour). Platform-agnostic (native + WASM consumers).
16pub mod anatomy_pack;
17/// Asset import: OBJ / STL / GLB → `Mesh` + semantic NQuins (Phase 1.3).
18pub mod assets;
19/// Authoring vocabulary + render planner (Phase 5): a qapp declares 3D + 2D views over one
20/// manifold; the planner enforces attestation gates, rights-bounded contexts, and budget-driven
21/// 3D→2D degradation before drawing. Gated like `place_time` (needs `crate::modalities`).
22#[cfg(any(
23 not(target_arch = "wasm32"),
24 feature = "wasm-logic",
25 feature = "wasm-scientific",
26 feature = "wasm-full"
27))]
28pub mod authoring;
29/// Validate-before-render barrier needs full `modalities::logic::geometry_asset_shacl`
30/// (not modalities_lite / wasm-ontology-only).
31#[cfg(any(
32 not(target_arch = "wasm32"),
33 feature = "wasm-scientific",
34 feature = "wasm-full"
35))]
36pub mod barrier;
37pub mod camera;
38/// Compile a `Mesh` into a sealed `.10d` container (the dense compiled-geometry sidecar)
39/// and read it back — the "mesh → `.10d`" step of the 3-D-anatomy asset pipeline.
40pub mod compile_10d;
41pub mod contract;
42pub mod control;
43pub mod derivation;
44/// P7.2 — Gamut / object-colour solid + closest-point gamut mapping.
45pub mod gamut;
46/// P7.4 — GPU colour-projection / gamut batch kernel + CPU oracle.
47pub mod gpu_colour_kernel;
48/// P7.1 — Metamers as the affine fibre of the colour-matching projection.
49pub mod metamer;
50/// Model-as-substrate (Phase 6, §F): one buffer holds a renderable manifold AND the transcoded
51/// P64 weights; the renderer projects the manifold while the weights are co-resident. Gated to
52/// where `crate::p64_weight` (the transcoder) compiles.
53#[cfg(any(not(target_arch = "wasm32"), feature = "wasm-llm"))]
54pub mod model_substrate;
55pub mod navigation;
56pub mod pga;
57/// Physics of artefacts — bbox admission, kinematic joints, material/mass/momentum (Phase 2).
58pub mod physics;
59/// Place / space / time binding — an artefact NQuin queried by the spatio-temporal AND deontic
60/// modalities over one shared identity (Phase 3); delegates to the inherited modality stack.
61/// Gated to exactly the configs where `crate::modalities` (the values/logic layer it builds on)
62/// is compiled — native always; on wasm only with the logic/scientific/full feature sets, not the
63/// minimal `portal` bundle.
64#[cfg(any(
65 not(target_arch = "wasm32"),
66 feature = "wasm-logic",
67 feature = "wasm-scientific",
68 feature = "wasm-full"
69))]
70pub mod place_time;
71/// Unified manifold projection — one `project()`, many views (Phase 1.4).
72pub mod projection;
73/// Sense path — the input twin (Phase 4): microphone PCM → forward DSP → the `∫Ψ > τ → Fact`
74/// bridge, every capture under the deontic/standpoint consent gate (surveillance-refusal default).
75/// Gated like `place_time` (needs `crate::modalities`).
76#[cfg(any(
77 not(target_arch = "wasm32"),
78 feature = "wasm-logic",
79 feature = "wasm-scientific",
80 feature = "wasm-full"
81))]
82pub mod sense;
83pub mod spectral;
84/// P7.3 — σ spectral blend as interpolation on the spectral manifold.
85pub mod spectral_blend;
86#[cfg(test)]
87pub mod spectral_harness;
88/// P7.0 — Spectral-space kernel: SPD/CMF POD types + CIE linear-projection.
89pub mod spectral_kernel;
90/// P7.7 — Unified spectral-operator API surface.
91pub mod spectral_operator;
92/// P7.8 — golden-oracle + CPU/GPU differential + determinism harness.
93pub mod spectral_oracle;
94pub mod standpoint;
95pub mod telemetry;
96
97/// LOD chain (P5.8): author mesh → decimate N LODs → serialize to `.10d` →
98/// renderer parses each level → `plan_view` selects the expected LOD. Gated
99/// like the scientific geometry stack (needs `crate::specialized_libs`).
100#[cfg(any(
101 not(target_arch = "wasm32"),
102 feature = "wasm-scientific",
103 feature = "wasm-full"
104))]
105pub mod lod_chain;
106
107/// WebGPU renderer (`PortalGpu`) — depth, bloom, tensor-node projection, mesh surfaces.
108#[cfg(feature = "gpu-runtime")]
109pub mod gpu;
110/// The `#[wasm_bindgen]` portal facade (`QualiaPortal`) driving the browser viewport.
111#[cfg(all(target_arch = "wasm32", feature = "portal"))]
112pub mod portal;
113#[cfg(all(target_arch = "wasm32", feature = "portal"))]
114pub mod portal_wasm;