mirror of
https://github.com/bevyengine/bevy
synced 2024-12-30 06:53:13 +00:00
963e2f08a2
This adds "high level" `Material` and `SpecializedMaterial` traits, which can be used with a `MaterialPlugin<T: SpecializedMaterial>`. `MaterialPlugin` automatically registers the appropriate resources, draw functions, and queue systems. The `Material` trait is simpler, and should cover most use cases. `SpecializedMaterial` is like `Material`, but it also requires defining a "specialization key" (see #3031). `Material` has a trivial blanket impl of `SpecializedMaterial`, which allows us to use the same types + functions for both. This makes defining custom 3d materials much simpler (see the `shader_material` example diff) and ensures consistent behavior across all 3d materials (both built in and custom). I ported the built in `StandardMaterial` to `MaterialPlugin`. There is also a new `MaterialMeshBundle<T: SpecializedMaterial>`, which `PbrBundle` aliases to.
31 lines
1.1 KiB
TOML
31 lines
1.1 KiB
TOML
[package]
|
|
name = "bevy_pbr"
|
|
version = "0.5.0"
|
|
edition = "2021"
|
|
description = "Adds PBR rendering to Bevy Engine"
|
|
homepage = "https://bevyengine.org"
|
|
repository = "https://github.com/bevyengine/bevy"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["bevy"]
|
|
|
|
[features]
|
|
webgl = []
|
|
|
|
[dependencies]
|
|
# bevy
|
|
bevy_app = { path = "../bevy_app", version = "0.5.0" }
|
|
bevy_asset = { path = "../bevy_asset", version = "0.5.0" }
|
|
bevy_core = { path = "../bevy_core", version = "0.5.0" }
|
|
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.5.0" }
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.5.0" }
|
|
bevy_math = { path = "../bevy_math", version = "0.5.0" }
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.5.0", features = ["bevy"] }
|
|
bevy_render = { path = "../bevy_render", version = "0.5.0" }
|
|
bevy_transform = { path = "../bevy_transform", version = "0.5.0" }
|
|
bevy_utils = { path = "../bevy_utils", version = "0.5.0" }
|
|
bevy_window = { path = "../bevy_window", version = "0.5.0" }
|
|
|
|
# other
|
|
bitflags = "1.2"
|
|
# direct dependency required for derive macro
|
|
bytemuck = { version = "1", features = ["derive"] }
|