2020-05-30 19:31:04 +00:00
|
|
|
[package]
|
|
|
|
name = "bevy_sprite"
|
2022-04-17 23:04:52 +00:00
|
|
|
version = "0.8.0-dev"
|
2021-10-27 00:12:14 +00:00
|
|
|
edition = "2021"
|
2020-08-10 00:24:27 +00:00
|
|
|
description = "Provides sprite functionality for Bevy Engine"
|
|
|
|
homepage = "https://bevyengine.org"
|
|
|
|
repository = "https://github.com/bevyengine/bevy"
|
2021-07-23 21:11:51 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2020-08-10 00:24:27 +00:00
|
|
|
keywords = ["bevy"]
|
2020-05-30 19:31:04 +00:00
|
|
|
|
|
|
|
[dependencies]
|
2020-08-10 00:39:28 +00:00
|
|
|
# bevy
|
2022-04-17 23:04:52 +00:00
|
|
|
bevy_app = { path = "../bevy_app", version = "0.8.0-dev" }
|
|
|
|
bevy_asset = { path = "../bevy_asset", version = "0.8.0-dev" }
|
|
|
|
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.8.0-dev" }
|
|
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.8.0-dev" }
|
|
|
|
bevy_log = { path = "../bevy_log", version = "0.8.0-dev" }
|
|
|
|
bevy_math = { path = "../bevy_math", version = "0.8.0-dev" }
|
|
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.8.0-dev", features = [
|
2021-12-14 03:58:23 +00:00
|
|
|
"bevy",
|
|
|
|
] }
|
2022-04-17 23:04:52 +00:00
|
|
|
bevy_render = { path = "../bevy_render", version = "0.8.0-dev" }
|
|
|
|
bevy_transform = { path = "../bevy_transform", version = "0.8.0-dev" }
|
|
|
|
bevy_utils = { path = "../bevy_utils", version = "0.8.0-dev" }
|
2020-06-06 07:12:38 +00:00
|
|
|
|
2020-08-10 00:39:28 +00:00
|
|
|
# other
|
2021-12-14 03:58:23 +00:00
|
|
|
bytemuck = { version = "1.5", features = ["derive"] }
|
2020-09-10 19:54:24 +00:00
|
|
|
guillotiere = "0.6.0"
|
2021-12-14 03:58:23 +00:00
|
|
|
thiserror = "1.0"
|
|
|
|
rectangle-pack = "0.4"
|
2020-11-28 00:39:59 +00:00
|
|
|
serde = { version = "1", features = ["derive"] }
|
Add 2d meshes and materials (#3460)
# Objective
The current 2d rendering is specialized to render sprites, we need a generic way to render 2d items, using meshes and materials like we have for 3d.
## Solution
I cloned a good part of `bevy_pbr` into `bevy_sprite/src/mesh2d`, removed lighting and pbr itself, adapted it to 2d rendering, added a `ColorMaterial`, and modified the sprite rendering to break batches around 2d meshes.
~~The PR is a bit crude; I tried to change as little as I could in both the parts copied from 3d and the current sprite rendering to make reviewing easier. In the future, I expect we could make the sprite rendering a normal 2d material, cleanly integrated with the rest.~~ _edit: see <https://github.com/bevyengine/bevy/pull/3460#issuecomment-1003605194>_
## Remaining work
- ~~don't require mesh normals~~ _out of scope_
- ~~add an example~~ _done_
- support 2d meshes & materials in the UI?
- bikeshed names (I didn't think hard about naming, please check if it's fine)
## Remaining questions
- ~~should we add a depth buffer to 2d now that there are 2d meshes?~~ _let's revisit that when we have an opaque render phase_
- ~~should we add MSAA support to the sprites, or remove it from the 2d meshes?~~ _I added MSAA to sprites since it's really needed for 2d meshes_
- ~~how to customize vertex attributes?~~ _#3120_
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-01-08 01:29:08 +00:00
|
|
|
bitflags = "1.2"
|
2022-01-08 10:18:22 +00:00
|
|
|
copyless = "0.1.5"
|