Skip to main content

bevy_eidolon/
lib.rs

1//! # bevy_eidolon
2//! [![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/NicoZweifel/bevy_eidolon?tab=readme-ov-file#licensecreditsinspirationsreferences)
3//! [![Crates.io](https://img.shields.io/crates/v/bevy_eidolon.svg)](https://crates.io/crates/bevy_eidolon)
4//! [![Downloads](https://img.shields.io/crates/d/bevy_eidolon.svg)](https://crates.io/crates/bevy_eidolon)
5//! [![Docs](https://docs.rs/bevy_eidolon/badge.svg)](https://docs.rs/bevy_eidolon/)
6//! [![CI](https://github.com/bevyengine/bevy/workflows/CI/badge.svg)](https://github.com/NicoZweifel/bevy_eidolon/actions)
7//!
8//! > *"Reality is illusion"*
9//!
10//! This is a generic instanced material, mostly for grass, foliage assemblies but could be used for
11//! fur or particles and as a high-performance replacement for gizmos when writing debugging tools in the future.
12//!
13//! I am planning to use this as a base for other instanced materials,
14//! similar to the `Material` and `MaterialExtension` in Bevy.
15//!
16//! **Caution: This package is in early development.**
17//!
18//! ## What is this for?
19//!
20//! Drawing a lot of instances (millions) that require GPU-driven rendering with no
21//! transparency/alpha masking and that need some variation in scale, color, etc.,
22//! but can't be reasonably done with the default material pipeline.
23//!
24//! Examples include:
25//! * Grass
26//! * Assemblies for foliage/trees and tools to debug them
27//! * Related systems (scattering, height mapping, obstacles)
28//!
29//! ## Scope & Philosophy
30//!
31//! The standard implementation only supports simple colors and basic features.
32//!
33//! **Important: I don't want this to become a monster material that supports everything.**
34//!
35//! However, there is an example on how to use the standard PBR lighting, and I don't mind
36//! adding specific examples if the API is a bit more mature.
37//!
38//! I want to focus on composability and declarativity to make it as simple as possible to
39//! write new features as custom materials.
40//!
41//! ## License
42//!
43//! Dual-licensed:
44//!
45//! - MIT License ([LICENSE-MIT](LICENSE-MIT) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))
46//! - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))
47//!
48//! ## Notes
49//!
50//! - Uses a custom pipeline for the `VisibilityRange` because of conflicting indices with
51//!   the standard pipeline. Might also be replaced by something else in the future.
52//! - This is work in progress, I am open to discussions about the API (cover some shapes,
53//!   simple cases), for now it's just a proof of concept.
54
55pub mod material;
56
57pub mod render;
58
59pub mod components;
60
61pub mod allocator;
62pub mod cull;
63pub mod prepass;
64pub mod utils;
65
66pub mod prelude {
67    pub use crate::{
68        allocator::prelude::*, components::*, cull::prelude::*, material::*, prepass::prelude::*,
69        render::prelude::*, utils::*,
70    };
71}