-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to 0.14.0 #537
Update to 0.14.0 #537
Conversation
* [12997](bevyengine/bevy#12997): rename `multi-threaded` to `multi_threaded`
Implemented in [12827](bevyengine/bevy#12827)
implemented in [12732](bevyengine/bevy#12732)
[12889](bevyengine/bevy#12889) Gpu Frustum Culling removed the dynamic_offset of Transparent2d and it became `extra_index` with the special value `PhaseItemExtraIndex::NONE`, which indicates the `None` that was here previously
[12453](https://github.com/StarArawn/bevy_ecs_tilemap/pull/bevyengine/bevy#12453): Render phases are now binned or sorted. Following the changes in the `mesh2d_manual` [example](https://github.com/bevyengine/bevy/blob/ecdd1624f302c5f71aaed95b0984cbbecf8880b7/examples/2d/mesh2d_manual.rs#L357-L358): use the `ViewSortedRenderPhases` resource.
in [9202](https://github.com/StarArawn/bevy_ecs_tilemap/pull/bevyengine/bevy/pull/9202) SubApp access has changed
[11698](bevyengine/bevy#11698) changed `GpuImage::size` to `UVec2`. Right above this, `Extent3d` does the same thing, so I'm taking a small leap and assuming can `as`.
[12791](bevyengine/bevy#12791) the `primitive_topology` field on `GpuMesh` was removed in favor of `key_bits` which can be constructed using `BaseMeshPipeline::from_primitive_topology`
[12216](bevyengine/bevy#12216) introduced an argument `&mut MeshVertexBufferLayouts` to `get_mesh_vertex_buffer_layout`, which bevy_ecs_tilemap calls in `RenderChunk2d::prepare`
[12163](bevyengine/bevy#12163) bevy_color was created and Color handling has changed. Specifically Color::as_linear_rgba_f32 has been removed. LinearRgba is now its own type that can be accessed via [`linear()`](https://docs.rs/bevy/0.14.0-rc.2/bevy/color/enum.Color.html#method.linear) and then converted.
[12582](bevyengine/bevy#12582) divided `VisibleEntities` into separate lists. So now we have to specify which kind of entity we want. I think we want the Mesh here, and I think we can get rid of the `.index` calls on Entity since Entity [already compares bits](https://docs.rs/bevy_ecs/0.14.0-rc.2/src/bevy_ecs/entity/mod.rs.html#173) for optimized codegen purposes. Waiting to do that until the other changes are in though so as to not change functionality until post-upgrade.
- [9202](bevyengine/bevy#9202) changed world access to functions. [relevent line](https://github.com/bevyengine/bevy/pull/9202/files#diff-b2fba3a0c86e496085ce7f0e3f1de5960cb754c7d215ed0f087aa556e529f97fR640) - This also surfaced [12655](bevyengine/bevy#12655) which removed `Into<AssetId<T>>` for `Handle<T>`. using a reference or .id() is the solution here.
In [12551](bevyengine/bevy#12551) `WorldCell` was removed. ...but it turns out we don't need it or its replacement anyway.
@@ -1,7 +1,7 @@ | |||
[package] | |||
name = "bevy_ecs_tilemap" | |||
description = "A tilemap rendering plugin for bevy which is more ECS friendly by having an entity per tile." | |||
version = "0.12.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bevy_ecs_tilemap 13 never released to crates.io, so I moved this to 14 because I think versions track bevy versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the pattern in recent releases is a coincidence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change the version to anything relevant. It seems like the Bevy project is hoping people will release rc candidates, although I don't know if anyone with publish access has the time for that at the moment for this crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think StarArawn generally handles release prep himself.
I think the current migration for:
Is part of the problem at the moment. I suspect we need to add our own visibility type and check system: But there may be something else going on too. |
As a result of [12582](bevyengine/bevy#12582) `check_visibility` must be implemented for the "renderable" tilemap entities. Doing this is trivial by taking advantage of the existing `check_visibility` type arguments, which accept a [`QF: QueryFilter + 'static`](https://docs.rs/bevy/0.14.0-rc.2/bevy/render/view/fn.check_visibility.html). The same `QueryFilter`` is used when checking `VisibleEntities`. I've chosen `With<TilemapRenderSettings` because presumably if the entity doesn't have a `TilemapRenderSettings` then it will not be rendering, but this could be as sophisticated or simple as we want. For example `WithLight` is currently implemented as ```rust pub type WithLight = Or<(With<PointLight>, With<SpotLight>, With<DirectionalLight>)>; ```
[13289](bevyengine/bevy#13489) introduced matrix naming changes, including `view_proj` which becomes `clip_from_world`
@rparrett yeah, it was the check_visibility implementation that needed to be added. I checked a number of examples (but not all yet) and so far every one I've checked has rendered. basic3d_iso |
I've updated color usage in examples as minimally as possible to make the tests and examples run, but I'd like to come back after this merges to update all of the example's colors to the new palettes and make some of the contrast more readable in a future PR if that's ok. |
I'll run through this checklist tonight:
edit: Looking good |
That would be nice. They have been in a particularly bad state since Bevy changed the default clear color. |
for windows, since you're doing mac later:
basic example has an issue in bevy_core_pipeline
all webgpu examples build. It doesn't look like we have a built-in setup to run them with cargo run so I did not run them. also cargo-examples is amazing. very useful, thanks for the recommendation. |
wasm builds also require bevy/webgl2 because the const is also gated by bevy_core_pipeline/webgl. This was added in 13418
|
Ah, that's why I suggested adding back |
oh you did? I must have missed that (and can't find it either) |
@@ -1,7 +1,7 @@ | |||
[package] | |||
name = "bevy_ecs_tilemap" | |||
description = "A tilemap rendering plugin for bevy which is more ECS friendly by having an entity per tile." | |||
version = "0.12.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the pattern in recent releases is a coincidence.
Oops, I had left my review pending. |
Co-authored-by: Rob Parrett <[email protected]>
Co-authored-by: Rob Parrett <[email protected]>
confirmed that fixed the build on my end after committing the review changes |
alright, I finished up the last of the clippy fixes too so this should be ready for you when you get to it later. Unless there's an issue I don't think there's anything left to do in this PR. |
Co-authored-by: Rob Parrett <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Awesome work.
See Bevy #12550
Opened ChristopherBiscardi#1 for a minor touchup removing the lint-allow from the |
Simplify async loading in ldtk/tiled helpers
merged it in. Committed the removal of the second allow lint as well. |
|
I started updating to the 0.14 rc release. Each commit has a link to a PR that enacted the change.
multi-threaded
feature tomulti_threaded
RenderAssets<Image>
is nowRenderAssets<GpuImage>
FloatOrd
is now inbevy_math
dynamic_offset
ofTransparent2d
GpuImage
now uses UVec2s&mut MeshVertexBufferLayouts
toget_mesh_vertex_buffer_layout
, which bevy_ecs_tilemap calls inRenderChunk2d::prepare
Color::as_linear_rgba_f32
has been removed and we have to go throughLinearRgb
using.linear()
.VisibleEntities
into separate lists. Specify the entity type we wantInto<AssetId<T>>
forHandle<T>
. using a reference or .id() is the solution here.World::cell()
... but we don't need it or the replacement anyway.check_visibility
must be implemented for the "renderable" tilemap entitiesview.view_proj
Current Status
Code compiles. Examples error out with bevyengine/bevy#13728
old history
Once the fix in the above issue is added (the zstd + bevy_pbr features to the dev-dependencies bevy), the examples run but don't render
Basic example is now rendering