nightshade 0.13.2

A cross-platform data-oriented game engine.
Documentation
//! Built-in render passes for the default pipeline.
//!
//! These passes implement [`PassNode`](super::rendergraph::PassNode) and can be used
//! directly or as references for custom pass implementations.
//!
//! # Geometry Passes
//!
//! | Pass | Description |
//! |------|-------------|
//! | [`ScenePass`] | Main PBR mesh rendering with lighting |
//! | [`MeshPass`] | Static mesh rendering |
//! | [`SkinnedMeshPass`] | Animated skeletal mesh rendering |
//! | [`DecalPass`] | Projected decal rendering |
//! | [`WaterPass`] | Water surface with reflections/refractions |
//! | [`WaterMeshPass`] | Water mesh displacement |
//! | [`ParticlePass`] | GPU particle billboard rendering |
//! | [`TextPass`] | 3D text rendering |
//! | [`SpritePass`] | 2D sprite rendering |
//! | [`LinesPass`] | Debug line rendering |
//! | [`GridPass`] | Infinite ground grid |
//! | [`SkyPass`] | Procedural sky/atmosphere |
//! | [`UiRectPass`] | UI rectangle rendering |
//!
//! # Shadow Passes
//!
//! | Pass | Description |
//! |------|-------------|
//! | [`ShadowDepthPass`] | Cascaded shadow map generation |
//!
//! Shadow mapping uses 4 cascades (`NUM_SHADOW_CASCADES`) for directional lights.
//!
//! # Post-Processing Passes
//!
//! | Pass | Description |
//! |------|-------------|
//! | [`PostProcessPass`] | Final compositing with tonemapping |
//! | [`BloomPass`] | HDR bloom effect |
//! | [`SsaoPass`] | Screen-space ambient occlusion |
//! | [`SsaoBlurPass`] | SSAO blur for soft shadows |
//! | [`SsgiPass`] | Screen-space global illumination |
//! | [`SsgiBlurPass`] | SSGI bilateral blur |
//! | [`DepthOfFieldPass`] | Bokeh depth of field |
//! | [`OutlinePass`] | Selection outline rendering |
//! | [`SelectionMaskPass`] | Selection mask generation |
//! | [`BlitPass`] | Simple texture copy |
//! | [`ComputeGrayscalePass`] | Grayscale conversion |
//!
//! # UI Passes
//!
//! | Pass | Description |
//! |------|-------------|
//! | `EguiPass` | egui immediate mode UI (requires `egui` feature) |
//!
//! # Using Built-in Passes
//!
//! ```ignore
//! fn configure_render_graph(
//!     &mut self,
//!     graph: &mut RenderGraph<World>,
//!     device: &wgpu::Device,
//!     surface_format: wgpu::TextureFormat,
//!     resources: RenderResources,
//! ) {
//!     // Add bloom post-processing
//!     let bloom = BloomPass::new(device, width, height);
//!     graph.pass(Box::new(bloom))
//!         .read("hdr", resources.scene_color)
//!         .write("bloom", bloom_texture);
//!
//!     // Add SSAO
//!     let ssao = SsaoPass::new(device, width, height);
//!     graph.pass(Box::new(ssao))
//!         .read("depth", resources.depth)
//!         .read("normals", resources.view_normals)
//!         .write("ssao_raw", ssao_raw);
//!
//!     let ssao_blur = SsaoBlurPass::new(device, width, height);
//!     graph.pass(Box::new(ssao_blur))
//!         .read("input", ssao_raw)
//!         .write("output", ssao_final);
//!
//!     // Final post-process with tonemapping
//!     let postprocess = PostProcessPass::new(device, surface_format, bloom_intensity);
//!     graph.pass(Box::new(postprocess))
//!         .read("hdr", resources.scene_color)
//!         .read("bloom", bloom_texture)
//!         .read("ssao", ssao_final)
//!         .write("output", resources.swapchain);
//! }
//! ```
//!
//! # Pass Configuration
//!
//! Most passes accept configuration in their constructors:
//!
//! ```ignore
//! // Bloom with custom mip levels
//! let bloom = BloomPass::new(device, width, height);
//!
//! // SSAO with custom radius/samples
//! let ssao = SsaoPass::new(device, width, height);
//!
//! // Post-process with bloom intensity
//! let postprocess = PostProcessPass::new(device, format, 0.3);  // 30% bloom
//! ```

pub mod setup;
pub use setup::ClearPass;

pub mod geometry;
#[cfg(feature = "sdf_sculpt")]
pub use geometry::SdfPass;
pub use geometry::{
    DecalPass, GrassPass, GridPass, InteriorMappingInstance, InteriorMappingMeshData,
    InteriorMappingPass, InteriorMappingState, InteriorMappingStateHandle, InteriorMappingTextures,
    InteriorMappingVertex, LinesPass, MeshPass, ParticlePass, ScenePass, SkinnedMeshPass, SkyPass,
    SpriteParticlePass, SpritePass, TextPass, UiImage, UiImagePass, UiPass, UiRect, UiRectPass,
    WaterMeshPass, WaterPass, create_interior_mapping_state, generate_box_mesh, generate_cube_mesh,
    generate_cylinder_mesh, generate_sphere_mesh, sync_bounding_volume_data, sync_lines_data,
    sync_normal_data,
};

pub mod shadow_depth;
pub use shadow_depth::{
    NUM_SHADOW_CASCADES, ShadowDepthPass, SpotlightShadowData, SpotlightShadowSlot,
};

pub mod postprocess;
pub use postprocess::{
    BlitPass, BloomPass, ColorGradeMode, ComputeGrayscalePass, DepthOfFieldPass, EffectsPass,
    EffectsState, EffectsStateHandle, EffectsUniforms, FxaaPass, OutlinePass, PostProcessPass,
    RaymarchMode, SelectionMaskPass, SsaoBlurPass, SsaoPass, SsgiBlurPass, SsgiPass, SsrBlurPass,
    SsrPass, create_effects_state,
};

pub mod ui;
#[cfg(feature = "egui")]
pub use ui::EguiPass;