Skip to main content

concinnity_render/
lib.rs

1//! The backend-agnostic, GPU-free render-prep layer. Holds the
2//! `RenderBackend`/`SceneControl` trait seam the device backends implement, plus
3//! the record builders, render graph, and CPU-side math that turn asset
4//! components into GPU-ready data. Depends on the vocabulary and the CPU compute
5//! over it (concinnity-core); owns no device or window handle. The device
6//! backends (concinnity-device) and the runtime driver (concinnity-engine) both
7//! build on top of this crate.
8//!
9//! The `vulkan` feature forwards a backend cfg and pulls in no dependency, so it
10//! does not move the crate off that tier.
11
12#![no_std]
13
14extern crate alloc;
15// The test harness is a std program.
16#[cfg(test)]
17extern crate std;
18
19// GPU-layout + render-math vocabulary and the mesh payload codec, re-exported
20// at the crate root so the render-prep modules reach them as `crate::<type>`.
21pub use concinnity_core::gfx::{
22    auto_exposure, chunk_coord, font, frustum, mesh_payload, profile, render_types, rt_reflections,
23    ssao, ssgi, ssr,
24};
25
26// The rest of what the render-prep modules reach by their `crate::` paths:
27// asset data types (`Decal`, `ParticleEmitter`, `InputKey`, ...), the stable
28// `AssetId` newtype, the environment-map bake the reflection-probe payload
29// builder calls, and the glass-quad generator.
30pub(crate) use concinnity_core::{build, components, ecs, geometry};
31
32pub mod area_light;
33pub mod backend;
34pub mod backend_init;
35pub mod bvh;
36pub mod call_buffer;
37pub mod chunk_window;
38pub mod csm;
39pub mod cursor;
40pub mod decal;
41pub mod display_mode;
42pub mod draw_slot;
43pub mod error;
44pub mod feedback;
45pub mod fullscreen;
46pub mod hdr_output;
47pub mod input;
48pub mod keymap;
49pub mod lights;
50pub mod ltc;
51pub mod mat;
52pub mod mipmap;
53pub mod ops;
54pub mod overlay_maps;
55pub mod parallel_ctx;
56pub mod particles;
57pub mod pass_timing;
58pub mod planar_reflection;
59pub mod reflection_probe;
60pub mod render_graph;
61pub mod rt_geom;
62pub mod rt_refit;
63pub mod rt_topology;
64pub mod scene_flow;
65pub mod scene_residency;
66pub mod shaders;
67pub mod shadow_schedule;
68pub mod skinned_pool;
69pub mod slang_programs;
70pub mod slang_source;
71pub mod slot_rewrites;
72pub mod snapshot;
73pub mod spot_shadow;
74pub mod sprite;
75pub mod streaming;
76pub mod text;
77pub mod transparent;
78
79/// The `#[repr(C)]` blocks the CPU uploads into the single-source `.slang`
80/// shaders, declared once for every backend (see `uniforms/mod.rs`).
81pub mod uniforms;
82
83pub mod volumetric_fog;
84
85/// GPU-free host-side layout contract for the Metal backend's shader structs
86/// (uniform structs, math, shader-layout asserts). Metal-specific but device-free,
87/// so it is compiled unconditionally and its layout tests run on every platform's
88/// CI. The Metal backend (concinnity-device) re-exports it under its own `metal`.
89pub mod metal;
90
91/// The same for the DirectX and Vulkan backends: their repr(C) uniform / probe
92/// structs + GPU-timing slot arithmetic (mirrored in the HLSL / GLSL shaders).
93/// Backend-specific but device-free (plain repr(C), no windows/ash types), so
94/// they compile unconditionally and their layout tests count toward coverage.
95/// The DirectX / Vulkan backends (concinnity-device) re-export them under their
96/// own `directx` / `vulkan`.
97pub mod directx;
98pub mod vulkan;