Skip to main content

infinitegfx_core/
lib.rs

1pub mod backend;
2pub mod core;
3pub mod effects;
4pub mod font;
5pub mod modulators;
6
7pub use backend::GfxBackend;
8pub use core::gfx_chain::GfxChain;
9pub use core::{
10    GfxAddressMode, GfxFrameProcessor, GfxHandle, GfxModulator, GfxParam, RenderContext,
11};
12pub use modulators::{AudioBridge, KickPumper, LinearSweep, RampingLfo};
13
14/// Standard structure for global parameters passed to all shaders.
15#[repr(C)]
16#[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable, Default, Debug)]
17pub struct StandardGlobals {
18    /// The current playback time in seconds.
19    pub time: f32,
20    /// Kick drum intensity (0.0 to 1.0).
21    pub kick: f32,
22    /// Filter sweep intensity (0.0 to 1.0).
23    pub sweep: f32,
24    /// Horizontal resolution of the render target.
25    pub res_x: f32,
26    /// Vertical resolution of the render target.
27    pub res_y: f32,
28    /// Global fade-in/out progress.
29    pub fade: f32,
30    /// Reserved parameter 2.
31    pub p2: f32,
32    /// Reserved parameter 3 (often used for reactive rotation).
33    pub p3: f32,
34}