sgl-3d 0.4.2

Caller-driven 3D rendering for SGL games, native and in the browser (WebGPU)
Documentation
//! Caller-driven 3D rendering for SGL, native and in the browser (WASM +
//! WebGPU). Games own composition, simulation and content.
#![deny(unsafe_code)]
mod content;
pub(crate) mod counters;
#[cfg(any(test, feature = "diagnostics"))]
pub mod diagnostics;
mod frame_input;
pub mod graphics_device;
mod renderer;
mod scene;
pub mod settings;
mod shading;
mod stages;
#[cfg(all(test, not(target_arch = "wasm32")))]
mod test_support;
pub mod timing;
mod view;

pub use content::baked_specular_probe::{
    BakedSpecularProbe, ProbeError, SpecularProbeBox, SpecularProbeRadiance, SpecularProbeTexels,
};
pub use content::decal::Decal;
pub use content::dynamic_gi::DynamicGiVolume;
pub use content::identity::{
    DecalId, DecalImageId, EnvironmentId, InstanceId, LightId, MaterialId, ModelId, ShaderId,
};
pub use content::instance::{InstanceState, Mobility};
pub use content::irradiance_volume::{IrradianceCell, IrradianceVolume};
pub use content::light::{Light, LightShape};
pub use content::lighting::{
    Backdrop, DirectionalLight, DirectionalShadow, EnvironmentLight, HemisphereLight, Mist,
};
pub use content::material::{AlphaMode, NormalLayer, SurfaceMaterial};
pub use content::model::{AssetIds, ModelMesh};
pub use content::shader::{MaterialShader, ShaderSource};
pub use content::transient::FogVolume;
pub use content::{
    asset, baked_specular_probe, deformation, environment, geometry, static_lighting,
};
pub use frame_input::{
    AgxLook, AutoExposure, BloomParameters, Camera, ColorGrading, ColorGradingGlobal,
    ColorGradingSection, CompensationCurve, CompensationCurveError, Exposure, Fog, FrameInput,
    MeteringMask, MotionBlurParameters, perspective,
};
pub use glam;
pub use renderer::{Renderer, RendererError};
pub use scene::irradiance_volume::PreparedIrradianceRegion;
pub use scene::rays::acceleration::RayTracingStats;
pub use scene::{PreparedModel, Scene, SceneError};
pub use settings::ToneMapping;
pub use stages::shadows::local::LocalShadowStats;
pub use view::draw_list::GeometryStats;

/// Caller-authored spatial mesh alternatives, bounded in primary-camera
/// pixels (`Scene::set_mesh_lods`).
pub mod lod {
    pub use crate::content::lod::MeshLod;
    pub use crate::shading::culling::MAX_MESH_LODS;
}
/// Caller-authored additive geometry.
pub mod effects {
    pub use crate::content::transient::{Glow, GlowKind, GlowProfile};
}
/// A game's material shaders (`Scene::add_shader`): their source, what a
/// material names, the parameter block's layout, why a module is refused,
/// and the contract's limits.
pub mod shader {
    pub use crate::content::shader::{
        ForbiddenItem, MaterialShader, SHADER_LOOP_BUDGET, SHADER_PARAMS_MAX_BYTES, ShaderError,
        ShaderParamField, ShaderParamsLayout, ShaderSource,
    };
}
/// Caller-authored heat shimmer geometry.
pub mod heat_distortion {
    pub use crate::content::transient::{HeatDistortion, MAX_DISPLACEMENT_PIXELS, MAX_VERTICES};
}