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