Skip to main content

concinnity_engine/gfx/
mod.rs

1//! The client's render layer. Everything below the client sits in
2//! concinnity-core and is re-exported here under the historical
3//! `crate::gfx::<module>` paths: the GPU data layouts and render math (camera,
4//! frustum, post-process settings) plus the CPU kernels over them from
5//! `concinnity_core::gfx`, and the backend-agnostic render-prep (record
6//! builders, render graph, trait seam, and the GPU-free cursor / sprite / text /
7//! lights / streaming layout helpers) from `concinnity_core::render`.
8//!
9//! What remains declared here are the runtime render systems (the renderer
10//! driver, animation, camera controllers, draw list) and the client-only
11//! settings/quality-preset resolution. The re-exports are `pub` so the editor
12//! crate can reach them through `concinnity_engine::gfx::*` (e.g. shader-layout
13//! reflection); `chunk_coord` is named only by the chunk-streaming drive, so it
14//! stays crate-private.
15pub(crate) use concinnity_core::gfx::chunk_coord;
16pub use concinnity_core::gfx::{
17    anim_graph, auto_exposure, camera, font, frustum, ik, lines, lod, mesh_payload, mesh_seed,
18    morph_weights, pose_blend, pose_scratch, profile, proportions, render_types, root_motion,
19    rt_reflections, skeleton, ssao, ssgi, ssr, transform, transform_propagation, view_modes,
20};
21
22// Render-prep from `concinnity_core::render` that the client's own systems consume (the
23// device backends reach the rest through concinnity-device's own bridge, not
24// this crate). `pub` for the pieces the editor / app crates name, `pub(crate)`
25// for the rest.
26pub use concinnity_core::render::{
27    backend, backend_init, decal, error, feedback, input, ops, particles, scene_flow,
28    scene_residency, snapshot, volumetric_fog,
29};
30pub(crate) use concinnity_core::render::{
31    call_buffer, chunk_window, cursor, display_mode, keymap, lights, overlay_maps, sprite, text,
32};
33// Seeded / driven by the client's GraphicsSystem.
34pub use concinnity_core::render::draw_slot;
35pub(crate) use concinnity_core::render::{planar_reflection, reflection_probe};
36
37// The bundled glyph atlas baked into the binary: the face the startup error
38// screen draws with, and the fallback for a world whose labels name no Font.
39pub(crate) mod builtin_font;
40
41/// Skeletal animation playback. Internal system, constructed by `World::start`
42/// when the world declares any `Animation`; produces per-frame skinning matrices.
43/// `pub` so the editor crate can drive the clip hot-reload through the
44/// `AnimationSystem` setter API.
45pub mod animation;
46/// First-person / fly-through camera controller. Internal system, constructed by
47/// `World::start` from a `Camera3D`'s controller settings. `pub` so the editor
48/// crate can zero the controller's velocity behind an externally driven pose.
49pub mod camera_controller;
50pub(crate) mod draw_list;
51/// Live reassignment of a running world's draw slots (their material and cull
52/// distance), for an editor previewing a Prop edit without a rebuild.
53pub mod draw_preview;
54/// The renderer driver. An internal system (not a declarable asset), constructed
55/// by `World::start` when the world declares a `GraphicsConfig`.
56pub mod graphics_system;
57/// Live application of the world's lighting assets to a running world, for an
58/// editor previewing sun / fog / shadow / post-process edits without a rebuild.
59pub mod lighting_preview;
60/// The renderer's reading of one compiled `Material`: GPU uniforms plus the
61/// texture-pool slots its references resolve to.
62pub(crate) mod material_entry;
63/// Live re-resolution of a `CharacterShape` against a running world's poses,
64/// for an editor previewing slider edits without a rebuild.
65pub mod shape_preview;
66// Per-frame input sampling + FrameInput publish. Internal system, constructed
67// alongside GraphicsSystem (same gate) and scheduled immediately after it.
68pub(crate) mod input_system;
69// 2D overlay draw-list build + menu-state publish. Internal system,
70// constructed alongside GraphicsSystem (same gate) and scheduled first.
71pub(crate) mod overlay;
72// Engine-side allocation authority for backend draw slots + pre-reserved
73// skinned instances (the `RenderSlots` resource).
74pub(crate) mod render_slots;
75// SettingCommand / SceneCommand application + settings snapshot ownership.
76// Internal system, constructed alongside GraphicsSystem (same gate) and
77// scheduled just before it.
78pub(crate) mod settings_system;
79// Asset-streaming home: the re-exported `no_std` policy core (`StreamPlanner`)
80// plus the `std` texture / mesh / chunk drivers it schedules.
81pub(crate) mod streaming;
82/// Asset-streaming drive (texture / mesh / voxel-world chunk pools) + the
83/// camera-relative view publish. Internal system, constructed alongside
84/// GraphicsSystem (same gate) and scheduled immediately before it. `pub` so the
85/// editor's debug server can name `StreamingStats` (its state lives in the parked
86/// `StreamingState` resource, read via `World::streaming_stats`).
87pub mod streaming_system;
88// Recording mock RenderBackend + the GraphicsSystem test-injection hooks,
89// compiled only into the unit-test binary. Implements `core::render`'s
90// RenderBackend seam on a client-local type and carries a `config::Settings`,
91// so it stays with the GraphicsSystem tests that consume it.
92pub(crate) mod look_controls;
93#[cfg(test)]
94pub(crate) mod mock_backend;
95pub(crate) mod quality_preset;
96// How the world's authored render settings resolve against the user's persisted
97// settings-menu choices and the active quality preset's ceiling.
98pub(crate) mod render_config;
99pub(crate) mod setting_action;
100pub(crate) mod settings;
101// Handle -> asset id bridge for SkinnedMesh correlation references, published by
102// GraphicsSystem and read by the animation / third-person systems.
103pub(crate) mod skinned_mesh_map;
104// Third-person character controller. Internal system, constructed instead of
105// Camera3DSystem when the controlling camera's controller has a `follow` block.
106pub(crate) mod third_person;