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
67
68
69
70
71
//! Composable render graph system for multi-pass rendering pipelines.
//!
//! This module provides a flexible, node-based render graph architecture that allows
//! chaining multiple render passes together with automatic ping-pong buffer management.
//! Each pass can read from the previous pass's output and write to its own render target,
//! enabling complex post-processing chains and multi-stage rendering effects.
//!
//! # Architecture
//!
//! The render graph uses a linear pipeline model:
//!
//! ```text
//! ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
//! │ EffectNode │───▶│ PostProcess │───▶│ PostProcess │───▶│ Screen │
//! │ (Scene) │ │ Node 1 │ │ Node 2 │ │ (Final) │
//! └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
//! │ │ │
//! ▼ ▼ ▼
//! Target A ◀────────▶ Target B (ping-pong)
//! ```
//!
//! # Node Types
//!
//! - [`EffectNode`] / [`HotEffectNode`]: Full-screen shader effects (backgrounds, procedural scenes)
//! - [`PostProcessNode`] / [`HotPostProcessNode`]: Screen-space post-processing (blur, bloom, color grading)
//! - [`WorldPostProcessNode`] / [`HotWorldPostProcessNode`]: Post-processing with camera/world data (raymarching, fog)
//! - [`MeshNode`]: 3D mesh rendering with depth testing
//!
//! Hot-reload variants automatically watch shader files and recompile on changes.
//!
//! # Example
//!
//! ```ignore
//! use hoplite::{RenderGraph, EffectNode, PostProcessNode};
//!
//! // Build a render graph with a scene and post-processing
//! let mut graph = RenderGraph::builder()
//! .node(EffectNode::new(scene_effect)) // Render procedural scene
//! .node(PostProcessNode::new(bloom_pass)) // Apply bloom
//! .node(PostProcessNode::new(tonemap_pass)) // Tonemap to screen
//! .build(&gpu);
//!
//! // In render loop:
//! loop {
//! graph.execute(&gpu, time, &camera);
//! }
//! ```
//!
//! # With UI Overlay
//!
//! ```ignore
//! graph.execute_with_ui(&gpu, time, &camera, |gpu, pass| {
//! ui.render(gpu, pass); // UI composited on top of final output
//! });
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use RenderNode;
pub use ;