#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]12//! Provides raytraced lighting.3//!4//! See [`SolariPlugins`] for more info.5//!6//! 78extern crate alloc;910pub mod pathtracer;11pub mod realtime;12pub mod scene;1314/// The solari prelude.15///16/// This includes the most common types in this crate, re-exported for your convenience.17pub mod prelude {18pub use super::SolariPlugins;19pub use crate::realtime::SolariLighting;20pub use crate::scene::RaytracingMesh3d;21}2223use crate::realtime::SolariLightingPlugin;24use crate::scene::RaytracingScenePlugin;25use bevy_app::{PluginGroup, PluginGroupBuilder};26use bevy_render::settings::WgpuFeatures;2728/// An experimental set of plugins for raytraced lighting.29///30/// This plugin group provides:31/// * [`SolariLightingPlugin`] - Raytraced direct and indirect lighting.32/// * [`RaytracingScenePlugin`] - BLAS building, resource and lighting binding.33///34/// There's also:35/// * [`pathtracer::PathtracingPlugin`] - A non-realtime pathtracer for validation purposes (not added by default).36///37/// To get started, add this plugin to your app, and then add `RaytracingMesh3d` and `MeshMaterial3d::<StandardMaterial>` to your entities.38pub struct SolariPlugins;3940impl PluginGroup for SolariPlugins {41fn build(self) -> PluginGroupBuilder {42PluginGroupBuilder::start::<Self>()43.add(RaytracingScenePlugin)44.add(SolariLightingPlugin)45}46}4748impl SolariPlugins {49/// [`WgpuFeatures`] required for these plugins to function.50pub fn required_wgpu_features() -> WgpuFeatures {51WgpuFeatures::EXPERIMENTAL_RAY_TRACING_ACCELERATION_STRUCTURE52| WgpuFeatures::EXPERIMENTAL_RAY_QUERY53| WgpuFeatures::BUFFER_BINDING_ARRAY54| WgpuFeatures::TEXTURE_BINDING_ARRAY55| WgpuFeatures::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING56| WgpuFeatures::PARTIALLY_BOUND_BINDING_ARRAY57}58}596061