From 21b2b86864cd1ebc0faa8e08a791fa3a71d3dcea Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Mon, 6 Mar 2023 02:23:22 -0800 Subject: [PATCH 01/16] Add 0.10.0 changelog (#7926) * Add 0.10.0 changelog * Add missing ` --- CHANGELOG.md | 986 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 986 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eed0d3448620f..ade264b8a6473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,992 @@ current changes on git with [previous release tags][git_tag_comparison]. [git_tag_comparison]: https://github.com/bevyengine/bevy/compare/v0.9.0...main +## Version 0.10.0 (2023-03-06) + +## Added + +- [Accessibility: Added `Label` for marking text specifically as a label for UI controls.][6874] +- [Accessibility: Integrate with and expose AccessKit accessibility.][6874] +- [App: `App::setup`][7586] +- [App: `SubApp::new`][7290] +- [App: Bevy apps will now log system information on startup by default][5454] +- [Audio Expose symphonia features from rodio in bevy_audio and bevy][6388] +- [Audio: Basic spatial audio][6028] +- [ECS: `bevy_ptr::dangling_with_align`: creates a well-aligned dangling pointer to a type whose alignment is not known at compile time.][6618] +- [ECS: `Column::get_added_ticks`][6547] +- [ECS: `Column::get_column_ticks`][6547] +- [ECS: `DetectChanges::set_if_neq`: triggering change detection when the new and previous values are equal. This will work on both components and resources.][6853] +- [ECS: `SparseSet::get_added_ticks`][6547] +- [ECS: `SparseSet::get_column_ticks`][6547] +- [ECS: `Tick`, a wrapper around a single change detection tick.][6547] +- [ECS: `UnsafeWorldCell::world_mut` now exists and can be used to get a `&mut World` out of `UnsafeWorldCell`][7381] +- [ECS: `WorldId` now implements the `FromWorld` trait.][7726] +- [ECS: A `core::fmt::Pointer` impl to `Ptr`, `PtrMut` and `OwnedPtr`.][6980] +- [ECS: Add `bevy_ecs::schedule_v3` module][6587] +- [ECS: Add `EntityMap::iter()`][6935] +- [ECS: Add `Ref` to the prelude][7392] +- [ECS: Add `report_sets` option to `ScheduleBuildSettings`][7756] +- [ECS: add `Resources::iter` to iterate over all resource IDs][6592] +- [ECS: add `UnsafeWorldCell` abstraction][6404] +- [ECS: Add `World::clear_resources` & `World::clear_all`][3212] +- [ECS: Add a basic example for system ordering][7017] +- [ECS: Add a missing impl of `ReadOnlySystemParam` for `Option>`][7245] +- [ECS: add a spawn_on_external method to allow spawning on the scope’s thread or an external thread][7415] +- [ECS: Add const `Entity::PLACEHOLDER`][6761] +- [ECS: Add example to show how to use `apply_system_buffers`][7793] +- [ECS: Add logging variants of system piping][6751] +- [ECS: Add safe constructors for untyped pointers `Ptr` and `PtrMut`][6539] +- [ECS: Add unit test with system that panics][7491] +- [ECS: Add wrapping_add to change_tick][7146] +- [ECS: Added “base sets” and ported CoreSet to use them.][7466] +- [ECS: Added `as_mut` and `as_ref` methods to `MutUntyped`.][7009] +- [ECS: Added `bevy::ecs::system::assert_is_read_only_system`.][7547] +- [ECS: Added `Components::resource_id`.][7284] +- [ECS: Added `DebugName` world query for more human friendly debug names of entities.][7186] +- [ECS: Added `distributive_run_if` to `IntoSystemConfigs` to enable adding a run condition to each system when using `add_systems`.][7724] +- [ECS: Added `EntityLocation::table_id`][6681] +- [ECS: Added `EntityLocation::table_row`.][6681] +- [ECS: Added `IntoIterator` implementation for `EventReader` so you can now do `&mut reader` instead of `reader.iter()` for events.][7720] +- [ECS: Added `len`, `is_empty`, `iter` methods on SparseSets.][7638] +- [ECS: Added `ManualEventReader::clear()`][7471] +- [ECS: Added `MutUntyped::with_type` which allows converting into a `Mut`][7113] +- [ECS: Added `new_for_test` on `ComponentInfo` to make test code easy.][7638] +- [ECS: Added `not` condition.][7559] +- [ECS: Added `on_timer` and `on_fixed_timer` run conditions][7866] +- [ECS: Added `OwningPtr::read_unaligned`.][7039] +- [ECS: Added `ReadOnlySystem`, which is implemented for any `System` type whose parameters all implement `ReadOnlySystemParam`.][7547] +- [ECS: Added `Ref` which allows inspecting change detection flags in an immutable way][7097] +- [ECS: Added `shrink` and `as_ref` methods to `PtrMut`.][7009] +- [ECS: Added `SystemMeta::name`][6900] +- [ECS: Added `SystemState::get_manual_mut`][7084] +- [ECS: Added `SystemState::get_manual`][7084] +- [ECS: Added `SystemState::update_archetypes`][7084] +- [ECS: Added a large number of methods on `App` to work with schedules ergonomically][7267] +- [ECS: Added conversions from `Ptr`, `PtrMut`, and `OwningPtr` to `NonNull`.][7181] +- [ECS: Added rore common run conditions: `on_event`, resource change detection, `state_changed`, `any_with_component`][7579] +- [ECS: Added support for variants of `bevy_ptr` types that do not require being correctly aligned for the pointee type.][7151] +- [ECS: Added the `CoreSchedule` enum][7267] +- [ECS: Added the `SystemParam` type `Deferred`, which can be used to defer `World` mutations. Powered by the new trait `SystemBuffer`.][6817] +- [ECS: Added the extension methods `.and_then(...)` and `.or_else(...)` to run conditions, which allows combining run conditions with short-circuiting behavior.][7605] +- [ECS: Added the marker trait `BaseSystemSet`, which is distinguished from a `FreeSystemSet`. These are both subtraits of `SystemSet`.][7863] +- [ECS: Added the method `reborrow` to `Mut`, `ResMut`, `NonSendMut`, and `MutUntyped`.][7114] +- [ECS: Added the private `prepare_view_uniforms` system now has a public system set for scheduling purposes, called `ViewSet::PrepareUniforms`][7267] +- [ECS: Added the trait `Combine`, which can be used with the new `CombinatorSystem` to create system combinators with custom behavior.][7605] +- [ECS: Added the trait `EntityCommand`. This is a counterpart of `Command` for types that execute code for a single entity.][7015] +- [ECS: introduce EntityLocation::INVALID const and adjust Entities::get comment][7623] +- [ECS: States derive macro][7535] +- [ECS: support for tuple structs and unit structs to the `SystemParam` derive macro.][6957] +- [Hierarchy: Add `Transform::look_to`][6692] +- [Hierarchy: Added `add_child`, `set_parent` and `remove_parent` to `EntityMut`][6926] +- [Hierarchy: Added `clear_children(&mut self) -> &mut Self` and `replace_children(&mut self, children: &[Entity]) -> &mut Self` function in `BuildChildren` trait][6035] +- [Hierarchy: Added `ClearChildren` and `ReplaceChildren` struct][6035] +- [Hierarchy: Added `push_and_replace_children_commands` and `push_and_clear_children_commands` test][6035] +- [Hierarchy: Added the `BuildChildrenTransformExt` trait][7024] +- [Input: add Input Method Editor support][7325] +- [Input: Added `Axis::devices`][5400] +- [INput: Added common run conditions for `bevy_input`][7806] +- [Macro: add helper for macro to get either bevy::x or bevy_x depending on how it was imported][7164] +- [Math: `CubicBezier2d`, `CubicBezier3d`, `QuadraticBezier2d`, and `QuadraticBezier3d` types with methods for sampling position, velocity, and acceleration. The generic `Bezier` type is also available, and generic over any degree of Bezier curve.][7653] +- [Math: `CubicBezierEasing`, with additional methods to allow for smooth easing animations.][7653] +- [Math: Added a generic cubic curve trait, and implementation for Cardinal splines (including Catmull-Rom), B-Splines, Beziers, and Hermite Splines. 2D cubic curve segments also implement easing functionality for animation.][7683] +- [New reflection path syntax: struct field access by index (example syntax: `foo#1`)][7321] +- [Reflect `State` generics other than just `RandomState` can now be reflected for both `hashbrown::HashMap` and `collections::HashMap`][7782] +- [Reflect: `Aabb` now implements `FromReflect`.][7396] +- [Reflect: `derive(Reflect)` now supports structs and enums that contain generic types][7364] +- [Reflect: `ParsedPath` for cached reflection paths][7321] +- [Reflect: `std::collections::HashMap` can now be reflected][7782] +- [Reflect: `std::collections::VecDeque` now implements `Reflect` and all relevant traits.][6831] +- [Reflect: Add reflection path support for `Tuple` types][7324] +- [Reflect: Added `ArrayIter::new`.][7449] +- [Reflect: Added `FromReflect::take_from_reflect`][6566] +- [Reflect: Added `List::insert` and `List::remove`.][7063] +- [Reflect: Added `Map::remove`][6564] +- [Reflect: Added `ReflectFromReflect`][6245] +- [Reflect: Added `TypeRegistrationDeserializer`, which simplifies getting a `&TypeRegistration` while deserializing a string.][7094] +- [Reflect: Added methods to `List` that were previously provided by `Array`][7467] +- [Reflect: Added support for enums in reflection paths][6560] +- [Reflect: Added the `bevy_reflect_compile_fail_tests` crate for testing compilation errors][7041] +- [Reflect: bevy_reflect: Add missing primitive registrations][7815] +- [Reflect: impl `Reflect` for `&'static Path`][6755] +- [Reflect: implement `Reflect` for `Fxaa`][7527] +- [Reflect: implement `TypeUuid` for primitives and fix multiple-parameter generics having the same `TypeUuid`][6633] +- [Reflect: Implemented `Reflect` + `FromReflect` for window events and related types. These types are automatically registered when adding the `WindowPlugin`.][6235] +- [Reflect: Register Hash for glam types][6786] +- [Reflect: Register missing reflected types for `bevy_render`][6811] +- [Render: A pub field `extras` to `GltfNode`/`GltfMesh`/`GltfPrimitive` which store extras][6973] +- [Render: A pub field `material_extras` to `GltfPrimitive` which store material extras][6973] +- [Render: Add 'Color::as_lcha' function (#7757)][7766] +- [Render: Add `Camera::viewport_to_world_2d`][6557] +- [Render: Add a more familiar hex color entry][7060] +- [Render: add ambient lighting hook][5428] +- [Render: Add bevy logo to the lighting example to demo alpha mask shadows][7895] +- [Render: Add Box::from_corners method][6672] +- [Render: add OpenGL and DX11 backends][7481] +- [Render: Add orthographic camera support back to directional shadows][7796] +- [Render: add standard material depth bias to pipeline][7847] +- [Render: Add support for Rgb9e5Ufloat textures][6781] +- [Render: Added buffer usage field to buffers][7423] +- [Render: can define a value from inside a shader][7518] +- [Render: EnvironmentMapLight support for WebGL2][7737] +- [Render: Implement `ReadOnlySystemParam` for `Extract<>`][7182] +- [Render: Initial tonemapping options][7594] +- [Render: ShaderDefVal: add an `UInt` option][6881] +- [Render: Support raw buffers in AsBindGroup macro][7701] +- [Rendering: `Aabb` now implements `Copy`.][7401] +- [Rendering: `ExtractComponent` can specify output type, and outputting is optional.][6699] +- [Rendering: `Mssaa::samples`][7292] +- [Rendering: Add `#else ifdef` to shader preprocessing.][7431] +- [Rendering: Add a field `push_constant_ranges` to RenderPipelineDescriptor and ComputePipelineDescriptor][7681] +- [Rendering: Added `Material::prepass_vertex_shader()` and `Material::prepass_fragment_shader()` to control the prepass from the `Material`][6284] +- [Rendering: Added `BloomSettings:lf_boost`, `BloomSettings:lf_boost_curvature`, `BloomSettings::high_pass_frequency` and `BloomSettings::composite_mode`.][6677] +- [Rendering: Added `BufferVec::extend`][6833] +- [Rendering: Added `BufferVec::truncate`][6833] +- [Rendering: Added `Camera::msaa_writeback` which can enable and disable msaa writeback.][7671] +- [Rendering: Added `CascadeShadowConfigBuilder` to help with creating `CascadeShadowConfig`][7456] +- [Rendering: Added `DepthPrepass` and `NormalPrepass` component to control which textures will be created by the prepass and available in later passes.][6284] +- [Rendering: Added `Draw::prepare` optional trait function.][6885] +- [Rendering: Added `DrawFunctionsInternals::id()`][6745] +- [Rendering: Added `FallbackImageCubemap`.][7051] +- [Rendering: Added `FogFalloff` enum for selecting between three widely used “traditional” fog falloff modes: `Linear`, `Exponential` and `ExponentialSquared`, as well as a more advanced `Atmospheric` fog;][6412] +- [Rendering: Added `get_input_node`][6720] +- [Rendering: Added `Lcha` member to `bevy_render::color::Color` enum][7483] +- [Rendering: Added `MainTaret::main_texture_other`][7343] +- [Rendering: Added `PhaseItem::entity`][6885] +- [Rendering: Added `prepass_enabled` flag to the `MaterialPlugin` that will control if a material uses the prepass or not.][6284] +- [Rendering: Added `prepass_enabled` flag to the `PbrPlugin` to control if the StandardMaterial uses the prepass. Currently defaults to false.][6284] +- [Rendering: Added `PrepassNode` that runs before the main pass][6284] +- [Rendering: Added `PrepassPlugin` to extract/prepare/queue the necessary data][6284] +- [Rendering: Added `RenderCommand::ItemorldQuery` associated type.][6885] +- [Rendering: Added `RenderCommand::ViewWorldQuery` associated type.][6885] +- [Rendering: Added `RenderContext::add_command_buffer`][7248] +- [Rendering: Added `RenderContext::begin_tracked_render_pass`.][7053] +- [Rendering: Added `RenderContext::finish`][7248] +- [Rendering: Added `RenderContext::new`][7248] +- [Rendering: Added `SortedCameras`, exposing information that was previously internal to the camera driver node.][7671] +- [Rendering: Added `try_add_node_edge`][6720] +- [Rendering: Added `try_add_slot_edge`][6720] +- [Rendering: Added `with_r`, `with_g`, `with_b`, and `with_a` to `Color`.][6899] +- [Rendering: Added 2x and 8x sample counts for MSAA.][7684] +- [Rendering: Added a `#[storage(index)]` attribute to the derive `AsBindGroup` macro.][6129] +- [Rendering: Added an `EnvironmentMapLight` camera component that adds additional ambient light to a scene.][7051] +- [Rendering: Added argument to `ScalingMode::WindowSize` that specifies the number of pixels that equals one world unit.][6201] +- [Rendering: Added cylinder shape][6809] +- [Rendering: Added example `shaders/texture_binding_array`.][6995] +- [Rendering: Added new capabilities for shader validation.][6995] +- [Rendering: Added specializable `BlitPipeline` and ported the upscaling node to use this.][7671] +- [Rendering: Added subdivisions field to shape::Plane][7546] +- [Rendering: Added support for additive and multiplicative blend modes in the PBR `StandardMaterial`, via `AlphaMode::Add` and `AlphaMode::Multiply`;][6644] +- [Rendering: Added support for distance-based fog effects for PBR materials, controllable per-camera via the new `FogSettings` component;][6412] +- [Rendering: Added support for KTX2 `R8_SRGB`, `R8_UNORM`, `R8G8_SRGB`, `R8G8_UNORM`, `R8G8B8_SRGB`, `R8G8B8_UNORM` formats by converting to supported wgpu formats as appropriate][4594] +- [Rendering: Added support for premultiplied alpha in the PBR `StandardMaterial`, via `AlphaMode::Premultiplied`;][6644] +- [Rendering: Added the ability to `#[derive(ExtractComponent)]` with an optional filter.][7399] +- [Rendering: Added: `bevy_render::color::LchRepresentation` struct][7483] +- [Rendering: Clone impl for MaterialPipeline][7548] +- [Rendering: Implemented `Clone` for all pipeline types.][6653] +- [Rendering: Smooth Transition between Animations][6922] +- [Support optional env variable `BEVY_ASSET_ROOT` to explicitly specify root assets directory.][5346] +- [Task: Add thread create/destroy callbacks to TaskPool][6561] +- [Tasks: Added `ThreadExecutor` that can only be ticked on one thread.][7087] +- [the extension methods `in_schedule(label)` and `on_startup()` for configuring the schedule a system belongs to.][7790] +- [Transform: Added `GlobalTransform::reparented_to`][7020] +- [UI: `Size::new` is now `const`][6602] +- [UI: Add const to methods and const defaults to bevy_ui][5542] +- [UI: Added `all`, `width` and `height` functions to `Size`.][7468] +- [UI: Added `Anchor` component to `Text2dBundle`][6807] +- [UI: Added `CalculatedSize::preserve_aspect_ratio`][6825] +- [UI: Added `Component` derive to `Anchor`][6807] +- [UI: Added `RelativeCursorPosition`, and an example showcasing it][7199] +- [UI: Added `Text::with_linebreak_behaviour`][7283] +- [UI: Added `TextBundle::with_linebreak_behaviour`][7283] +- [UI: Added a `BackgroundColor` component to `TextBundle`.][7596] +- [UI: Added a helper method `with_background_color` to `TextBundle`.][7596] +- [UI: Added the `SpaceEvenly` variant to `AlignContent`.][7859] +- [UI: Added the `Start` and `End` variants to `AlignItems`, `AlignSelf`, `AlignContent` and `JustifyContent`.][7859] +- [UI: Adds `flip_x` and `flip_y` fields to `ExtractedUiNode`.][6292] +- [Utils: Added `SyncCell::read`, which allows shared access to values that already implement the `Sync` trait.][7718] +- [Utils: Added the guard type `bevy_utils::OnDrop`.][7181] +- [Window: Add `Windows::get_focused(_mut)`][6571] +- [Window: add span to winit event handler][6612] +- [Window: Transparent window on macos][7617] +- [Windowing: `WindowDescriptor` renamed to `Window`.][5589] +- [Windowing: Added `hittest` to `WindowAttributes`][6664] +- [Windowing: Added `Window::prevent_default_event_handling` . This allows bevy apps to not override default browser behavior on hotkeys like F5, F12, Ctrl+R etc.][7304] +- [Windowing: Added `WindowDescriptor.always_on_top` which configures a window to stay on top.][6527] +- [Windowing: Added an example `cargo run --example fallthrough`][6664] +- [Windowing: Added the `hittest`’s setters/getters][6664] +- [Windowing: Modifed the `WindowDescriptor`’s `Default` impl.][6664] +- [Windowing: Modified the `WindowBuilder`][6664] + +## Changed + +- [Animation: `AnimationPlayer` that are on a child or descendant of another entity with another player will no longer be run.][6785] +- [Animation: Animation sampling now runs fully multi-threaded using threads from `ComputeTaskPool`.][6785] +- [App: Adapt path type of dynamically_load_plugin][6734] +- [App: Break CorePlugin into TaskPoolPlugin, TypeRegistrationPlugin, FrameCountPlugin.][7083] +- [App: Increment FrameCount in CoreStage::Last.][7477] +- [App::run() will now panic when called from Plugin::build()][4241] +- [Asset: `AssetIo::watch_path_for_changes` allows watched path and path to reload to differ][6797] +- [Asset: make HandleUntyped::id private][7076] +- [Audio: `AudioOutput` is now a `Resource`. It's no longer `!Send`][6436] +- [Audio: AudioOutput is actually a normal resource now, not a non-send resource][7262] +- [ECS: `.label(SystemLabel)` is now referred to as `.in_set(SystemSet)`][7267] +- [ECS: `App::add_default_labels` is now `App::add_default_sets`][7267] +- [ECS: `App::add_system_set` was renamed to `App::add_systems`][7267] +- [ECS: `Archetype` indices and `Table` rows have been newtyped as `ArchetypeRow` and `TableRow`.][4878] +- [ECS: `ArchetypeGeneration` now implements `Ord` and `PartialOrd`.][6742] +- [ECS: `bevy_pbr::add_clusters` is no longer an exclusive system][7267] +- [ECS: `Bundle::get_components` now takes a `FnMut(StorageType, OwningPtr)`. The provided storage type must be correct for the component being fetched.][6902] +- [ECS: `ChangeTrackers` has been deprecated. It will be removed in Bevy 0.11.][7306] +- [ECS: `Command` closures no longer need to implement the marker trait `std::marker::Sync`.][7014] +- [ECS: `CoreStage` and `StartupStage` enums are now `CoreSet` and `StartupSet`][7267] +- [ECS: `EntityMut::world_scope` now allows returning a value from the immediately-computed closure.][7385] +- [ECS: `EntityMut`: rename `remove_intersection` to `remove` and `remove` to `take`][7810] +- [ECS: `EventReader::clear` now takes a mutable reference instead of consuming the event reader.][6851] +- [ECS: `EventWriter::send_batch` will only log a TRACE level log if the batch is non-empty.][7753] +- [ECS: `oldest_id` and `get_event` convenience methods added to `Events`.][5735] +- [ECS: `OwningPtr::drop_as` will now panic in debug builds if the pointer is not aligned.][7117] +- [ECS: `OwningPtr::read` will now panic in debug builds if the pointer is not aligned.][7117] +- [ECS: `Ptr::deref` will now panic in debug builds if the pointer is not aligned.][7117] +- [ECS: `PtrMut::deref_mut` will now panic in debug builds if the pointer is not aligned.][7117] +- [ECS: `Query::par_for_each(_mut)` has been changed to `Query::par_iter(_mut)` and will now automatically try to produce a batch size for callers based on the current `World` state.][4777] +- [ECS: `RemovedComponents` now internally uses an `Events` instead of an `Events`][7503] +- [ECS: `SceneSpawnerSystem` now runs under `CoreSet::Update`, rather than `CoreStage::PreUpdate.at_end()`.][7267] +- [ECS: `StartupSet` is now a base set][7574] +- [ECS: `System::default_labels` is now `System::default_system_sets`.][7267] +- [ECS: `SystemLabel` trait was replaced by `SystemSet`][7267] +- [ECS: `SystemParamState::apply` now takes a `&SystemMeta` parameter in addition to the provided `&mut World`.][6900] +- [ECS: `SystemTypeIdLabel` was replaced by `SystemSetType`][7267] +- [ECS: `tick_global_task_pools_on_main_thread` is no longer run as an exclusive system. Instead, it has been replaced by `tick_global_task_pools`, which uses a `NonSend` resource to force running on the main thread.][7267] +- [ECS: `Tick::is_older_than` was renamed to `Tick::is_newer_than`. This is not a functional change, since that was what was always being calculated, despite the wrong name.][7561] +- [ECS: `UnsafeWorldCell::world` is now used to get immutable access to the whole world instead of just the metadata which can now be done via `UnsafeWorldCell::world_metadata`][7381] +- [ECS: `World::init_non_send_resource` now returns the generated `ComponentId`.][7284] +- [ECS: `World::init_resource` now returns the generated `ComponentId`.][7284] +- [ECS: `World::iter_entities` now returns an iterator of `EntityRef` instead of `Entity`.][6843] +- [ECS: `World`s can now only hold a maximum of 2^32 - 1 tables.][6681] +- [ECS: `World`s can now only hold a maximum of 2^32- 1 archetypes.][6681] +- [ECS: `WorldId` now implements `SystemParam` and will return the id of the world the system is running in][7741] +- [ECS: Adding rendering extraction systems now panics rather than silently failing if no subapp with the `RenderApp` label is found.][7267] +- [ECS: Allow adding systems to multiple sets that share the same base set][7709] +- [ECS: change `is_system_type() -> bool` to `system_type() -> Option`][7715] +- [ECS: changed some `UnsafeWorldCell` methods to take `self` instead of `&self`/`&mut self` since there is literally no point to them doing that][7381] +- [ECS: Changed: `Query::for_each(_mut)`, `QueryParIter` will now leverage autovectorization to speed up query iteration where possible.][6547] +- [ECS: Default to using ExecutorKind::SingleThreaded on wasm32][7717] +- [ECS: Ensure `Query` does not use the wrong `World`][7150] +- [ECS: Exclusive systems may now be used with system piping.][7023] +- [ECS: expose `ScheduleGraph` for use in third party tools][7522] +- [ECS: extract topsort logic to a new method, one pass to detect cycles and …][7727] +- [ECS: Fixed time steps now use a schedule (`CoreSchedule::FixedTimeStep`) rather than a run criteria.][7267] +- [ECS: for disconnected, use Vec instead of HashSet to reduce insert overhead][7744] +- [ECS: Implement `SparseSetIndex` for `WorldId`][7125] +- [ECS: Improve the panic message for schedule build errors][7860] +- [ECS: Lift the 16-field limit from the `SystemParam` derive][6867] +- [ECS: Make `EntityRef::new` unsafe][7222] +- [ECS: Make `Query` fields private][7149] +- [ECS: make `ScheduleGraph::initialize` public][7723] +- [ECS: Make boxed conditions read-only][7786] +- [ECS: Make RemovedComponents mirror EventReaders api surface][7713] +- [ECS: Mark TableRow and TableId as repr(transparent)][7166] +- [ECS: Most APIs returning `&UnsafeCell` now returns `TickCells` instead, which contains two separate `&UnsafeCell` for either component ticks.][6547] +- [ECS: Move MainThreadExecutor for stageless migration.][7444] +- [ECS: Move safe operations out of `unsafe` blocks in `Query`][7851] +- [ECS: Optimize `.nth()` and `.last()` for event iterators][7530] +- [ECS: Optimize `Iterator::count` for event iterators][7582] +- [ECS: Provide public `EntityRef::get_change_ticks_by_id` that takes `ComponentId`][6683] +- [ECS: refactor: move internals from `entity_ref` to `World`, add `SAFETY` comments][6402] +- [ECS: Rename `EntityId` to `EntityIndex`][6732] +- [ECS: Rename `UnsafeWorldCellEntityRef` to `UnsafeEntityCell`][7568] +- [ECS: Rename schedule v3 to schedule][7519] +- [ECS: Rename state_equals condition to in_state][7677] +- [ECS: Replace `World::read_change_ticks` with `World::change_ticks` within `bevy_ecs` crate][6816] +- [ECS: Replaced the trait `ReadOnlySystemParamFetch` with `ReadOnlySystemParam`.][6865] +- [ECS: Simplified the `SystemParamFunction` and `ExclusiveSystemParamFunction` traits.][7675] +- [ECS: Speed up `CommandQueue` by storing commands more densely][6391] +- [ECS: Stageless: move final apply outside of spawned executor][7445] +- [ECS: Stageless: prettier cycle reporting][7463] +- [ECS: Systems without `Commands` and `ParallelCommands` will no longer show a `system_commands` span when profiling.][6900] +- [ECS: The `ReportHierarchyIssue` resource now has a public constructor (`new`), and implements `PartialEq`][7267] +- [ECS: The `StartupSchedule` label is now defined as part of the `CoreSchedules` enum][7267] +- [ECS: The `SystemParam` derive is now more flexible, allowing you to omit unused lifetime parameters.][6694] +- [ECS: the top level `bevy_ecs::schedule` module was replaced with `bevy_ecs::scheduling`][7267] +- [ECS: Use `World` helper methods for sending `HierarchyEvent`s][6921] +- [ECS: Use a bounded channel in the multithreaded executor][7829] +- [ECS: Use a default implementation for `set_if_neq`][7660] +- [ECS: Use consistent names for marker generics][7788] +- [ECS: Use correct terminology for a `NonSend` run condition panic][7841] +- [ECS: Use default-implemented methods for `IntoSystemConfig<>`][7870] +- [ECS: use try_send to replace send.await, unbounded channel should always b…][7745] +- [General: The MSRV of the engine is now 1.67.][7379] +- [Input: Bump gilrs version to 0.10][6558] +- [IOS, Android... same thing][7493] +- [Math: Update `glam` to `0.23`][7883] +- [Math: use `Mul` to double the value of `Vec3`][6607] +- [Reflect: bevy_reflect now uses a fixed state for its hasher, which means the output of `Reflect::reflect_hash` is now deterministic across processes.][7583] +- [Reflect: Changed function signatures of `ReflectComponent` methods, `apply`, `remove`, `contains`, and `reflect`.][7206] +- [Reflect: Changed the `List::push` and `List::pop` to have default implementations.][7063] +- [Reflect: Registered `SmallVec<[Entity; 8]>` in the type registry][6578] +- [Renamed methods on `GetPath`:][7321] + - `path` -> `reflect_path` + - `path_mut` -> `reflect_path_mut` + - `get_path` -> `path` + - `get_path_mut` -> `path_mut` +- [Render: Allow prepass in webgl][7537] +- [Render: bevy_pbr: Avoid copying structs and using registers in shaders][7069] +- [Render: bevy_pbr: Clear fog DynamicUniformBuffer before populating each frame][7432] +- [Render: bevy_render: Run calculate_bounds in the end-of-update exclusive systems][7127] +- [Render: Change the glTF loader to use `Camera3dBundle`][7890] +- [Render: Changed &mut PipelineCache to &PipelineCache][7598] +- [Render: Intepret glTF colors as linear instead of sRGB][6828] +- [Render: Move 'startup' Resource `WgpuSettings` into the `RenderPlugin`][6946] +- [Render: Move prepass functions to prepass_utils][7354] +- [Render: Only compute sprite color once per quad][7498] +- [Render: Only execute `#define` if current scope is accepting lines][7798] +- [Render: Pipelined Rendering][6503] +- [Render: Refactor Globals and View structs into separate shaders][7512] +- [Render: Replace UUID based IDs with a atomic-counted ones][6988] +- [Render: run clear trackers on render world][6878] +- [Render: set cull mode: None for Mesh2d][7514] +- [Render: Shader defs can now have a value][5900] +- [Render: Shrink ComputedVisibility][6305] +- [Render: Use prepass shaders for shadows][7784] +- [Rendering: `add_node_edge` is now infallible (panics on error)][6720] +- [Rendering: `add_slot_edge` is now infallible (panics on error)][6720] +- [Rendering: `AsBindGroup` is now object-safe.][6937] +- [Rendering: `BloomSettings::knee` renamed to `BloomPrefilterSettings::softness`.][6677] +- [Rendering: `BloomSettings::threshold` renamed to `BloomPrefilterSettings::threshold`.][6677] +- [Rendering: `HexColorError::Hex` has been renamed to `HexColorError::Char`][6940] +- [Rendering: `input_node` now panics on `None`][6720] +- [Rendering: `ktx2` and `zstd` are now part of bevy’s default enabled features][7696] +- [Rendering: `Msaa` is now enum][7292] +- [Rendering: `PipelineCache` no longer requires mutable access in order to queue render / compute pipelines.][7205] +- [Rendering: `RenderContext::command_encoder` is now private. Use the accessor `RenderContext::command_encoder()` instead.][7248] +- [Rendering: `RenderContext::render_device` is now private. Use the accessor `RenderContext::render_device()` instead.][7248] +- [Rendering: `RenderContext` now supports adding external `CommandBuffer`s for inclusion into the render graphs. These buffers can be encoded outside of the render graph (i.e. in a system).][7248] +- [Rendering: `scale` is now applied before updating `area`. Reading from it will take `scale` into account.][6201] +- [Rendering: `SkinnedMeshJoints::build` now takes a `&mut BufferVec` instead of a `&mut Vec` as a parameter.][6833] +- [Rendering: `StandardMaterial` now defaults to a dielectric material (0.0 `metallic`) with 0.5 `perceptual_roughness`.][7664] +- [Rendering: `TrackedRenderPass` now requires a `&RenderDevice` on construction.][7053] +- [Rendering: `Visibility` is now an enum][6320] +- [Rendering: Bloom now looks different.][6677] +- [Rendering: Directional lights now use cascaded shadow maps for improved shadow quality.][7064] +- [Rendering: ExtractedMaterials, extract_materials and prepare_materials are now public][7548] +- [Rendering: For performance reasons, some detailed renderer trace logs now require the use of cargo feature `detailed_trace` in addition to setting the log level to `TRACE` in order to be shown.][7639] +- [Rendering: Made cameras with the same target share the same `main_texture` tracker, which ensures continuity across cameras.][7671] +- [Rendering: Renamed `ScalingMode::Auto` to `ScalingMode::AutoMin`.][6496] +- [Rendering: Renamed `ScalingMode::None` to `ScalingMode::Fixed`][6201] +- [Rendering: Renamed `window_origin` to `viewport_origin`][6201] +- [Rendering: Renamed the `priority` field on `Camera` to `order`.][6908] +- [Rendering: Replaced `left`, `right`, `bottom`, and `top` fields with a single `area: Rect`][6201] +- [Rendering: StandardMaterials will now appear brighter and more saturated at high roughness, due to internal material changes. This is more physically correct.][7051] +- [Rendering: The `layout` field of `RenderPipelineDescriptor` and `ComputePipelineDescriptor` is now mandatory.][7681] +- [Rendering: The `rangefinder` module has been moved into the `render_phase` module.][7016] +- [Rendering: The bloom example has been renamed to bloom_3d and improved. A bloom_2d example was added.][6677] +- [Rendering: the SubApp Extract stage has been separated from running the sub app schedule.][7046] +- [Rendering: To enable multiple `RenderPhases` to share the same `TrackedRenderPass`, the `RenderPhase::render` signature has changed.][7043] +- [Rendering: update its `Transform` in order to preserve its `GlobalTransform` after the parent change][7024] +- [Rendering: Updated to wgpu 0.15, wgpu-hal 0.15.1, and naga 0.11][7356] +- [Rendering: Users can now use the DirectX Shader Compiler (DXC) on Windows with DX12 for faster shader compilation and ShaderModel 6.0+ support (requires `dxcompiler.dll` and `dxil.dll`)][7356] +- [Rendering: You can now set up the rendering code of a `RenderPhase` directly using the `RenderPhase::render` method, instead of implementing it manually in your render graph node.][7013] +- [Scenes: `SceneSpawner::spawn_dynamic` now returns `InstanceId` instead of `()`.][6663] +- [Shape: Change `From` to `TryFrom`][6484] +- [Tasks: `Scope` now uses `FallibleTask` to await the cancellation of all remaining tasks when it’s dropped.][6696] +- [Time: `Time::set_relative_speed_fXX` now allows a relative speed of -0.0.][7740] +- [UI: `FocusPolicy` default has changed from `FocusPolicy::Block` to `FocusPolicy::Pass`][7161] +- [UI: `TextPipeline::queue_text` and `GlyphBrush::compute_glyphs` now need a TextLineBreakBehaviour argument, in order to pass through the new field.][7283] +- [UI: `update_image_calculated_size_system` sets `preserve_aspect_ratio` to true for nodes with images.][6825] +- [UI: Added `Changed` to the change detection query of `text_system`. This ensures that any change in the size of a text node will cause any text it contains to be recomputed.][7674] +- [UI: Changed `Size::height` so it sets the `width` to `Val::AUTO`.][7626] +- [UI: Changed `Size::width` so it sets the `height` to `Val::AUTO`.][7626] +- [UI: Changed `TextAlignment` into an enum with `Left`, `Center`, and `Right` variants.][6807] +- [UI: Changed extract_uinodes to extract the flip_x and flip_y values from UiImage.][6292] +- [UI: Changed prepare_uinodes to swap the UV coordinates as required.][6292] +- [UI: Changed Taffy version to 0.3.3 and disabled its `grid` feature.][7859] +- [UI: Changed the `Size` `width` and `height` default values to `Val::Auto`][7475] +- [UI: Changed the `size` field of `CalculatedSize` to a Vec2.][7641] +- [UI: Changed UiImage derefs to texture field accesses.][6292] +- [UI: Changed UiImage to a struct with texture, flip_x, and flip_y fields.][6292] +- [UI: Modified the `text2d` example to show both linebreaking behaviours.][7283] +- [UI: Renamed `image_node_system` to `update_image_calculated_size_system`][6674] +- [UI: Renamed the `background_color` field of `ExtractedUiNode` to `color`.][7452] +- [UI: Simplified the UI examples. Replaced numeric values with the Flex property enums or elided them where possible, and removed the remaining use of auto margins.][7626] +- [UI: The `MeasureFunc` only preserves the aspect ratio when `preserve_aspect_ratio` is true.][6825] +- [UI: Updated `from_style` for Taffy 0.3.3.][7859] +- [UI: Upgraded to Taffy 0.2, improving UI layout performance significantly and adding the flexbox `gap` property and `AlignContent::SpaceEvenly`.][6743] +- [UI: Use `f32::INFINITY` instead of `f32::MAX` to represent unbounded text in Text2dBounds][6807] +- [Window: expose cursor position with scale][7297] +- [Window: Make WindowId::primary() const][6582] +- [Window: revert stage changed for window closing][7296] +- [Windowing: `WindowId` is now `Entity`.][5589] +- [Windowing: Moved `changed_window` and `despawn_window` systems to `CoreStage::Last` to avoid systems making changes to the `Window` between `changed_window` and the end of the frame as they would be ignored.][7517] +- [Windowing: Requesting maximization/minimization is done on the [`Window::state`] field.][5589] +- [Windowing: Width/height consolidated into a `WindowResolution` component.][5589] + +## Removed + +- [App: Removed `App::add_sub_app`][7290] +- [App: Rename dynamic feature][7340] +- [ECS: Remove .on_update method to improve API consistency and clarity][7667] +- [ECS: Remove `BuildWorldChildren` impl from `WorldChildBuilder`][6727] +- [ECS: Remove a duplicate lookup in `apply_state_transitions`][7800] +- [ECS: Remove an incorrect impl of `ReadOnlySystemParam` for `NonSendMut`][7243] +- [ECS: Remove APIs deprecated in 0.9][6801] +- [ECS: Remove broken `DoubleEndedIterator` impls on event iterators][7469] +- [ECS: Remove duplicate lookups from `Resource` initialization][7174] +- [ECS: Remove useless access to archetype in `UnsafeWorldCell::fetch_table`][7665] +- [ECS: Removed `AddBundle`. `Edges::get_add_bundle` now returns `Option`][6742] +- [ECS: Removed `Archetype::new` and `Archetype::is_empty`.][6742] +- [ECS: Removed `ArchetypeComponentId::new` and `ArchetypeComponentId::value`.][6742] +- [ECS: Removed `ArchetypeGeneration::value`][6742] +- [ECS: Removed `ArchetypeId::new` and `ArchetypeId::value`.][6742] +- [ECS: Removed `ArchetypeIdentity`.][6742] +- [ECS: Removed `Archetypes`’s `Default` implementation.][6742] +- [ECS: Removed `AsSystemLabel` trait][7267] +- [ECS: Removed `Entities::alloc_at_without_replacement` and `AllocAtWithoutReplacement`.][6740] +- [ECS: Removed `Entities`’s `Default` implementation.][6740] +- [ECS: Removed `EntityMeta`][6740] +- [ECS: Removed `on_hierarchy_reports_enabled` run criteria (now just uses an ad hoc resource checking run condition)][7267] +- [ECS: Removed `RunCriteriaLabel`][7267] +- [ECS: Removed `RunCriteriaLabel`][7267] +- [ECS: Removed `SystemParamFetch`, its functionality has been moved to `SystemParamState`.][6865] +- [ECS: Removed `Table::component_capacity`][4928] +- [ECS: Removed `transform_propagate_system_set`: this was a nonstandard pattern that didn’t actually provide enough control. The systems are already `pub`: the docs have been updated to ensure that the third-party usage is clear.][7267] +- [ECS: removed `UnsafeWorldCell::storages` since that is probably unsound since storages contains the actual component/resource data not just metadata][7381] +- [ECS: Removed stages, and all code that mentions stages][7267] +- [ECS: Removed states have been dramatically simplified, and no longer use a stack][7267] +- [ECS: Removed systems in `RenderSet/Stage::Extract` no longer warn when they do not read data from the main world][7267] +- [ECS: Removed the bound `T: Sync` from `Local` when used as an `ExclusiveSystemParam`.][7040] +- [ECS: Removed the method `ExclusiveSystemParamState::apply`.][7489] +- [ECS: Removed the trait `ExclusiveSystemParamState`, merging its functionality into `ExclusiveSystemParam`.][6919] +- [ECS: Removed the trait `SystemParamState`, merging its functionality into `SystemParam`.][6919] +- [ECS: Support `SystemParam` types with const generics][7001] +- [ECS: Use T::Storage::STORAGE_TYPE to optimize out unused branches][6800] +- [Hierarchy: Expose transform propagate systems][7145] +- [Hierarchy: Make adding children idempotent][6763] +- [Hierarchy: Remove `EntityCommands::add_children`][6942] +- [Input: Gamepad events refactor][6965] +- [Reflect: Make proc macros hygienic in bevy_reflect_derive][6752] +- [Reflect: Removed `#[module]` helper attribute for `Reflect` derives (this is not currently used)][7148] +- [Reflect: Removed `Array` as supertrait of `List`][7467] +- [Reflect: Removed `PixelInfo` and get `pixel_size` from wgpu][6820] +- [Reflect: Removed `ReflectSerialize` and `ReflectDeserialize` registrations from most glam types][6580] +- [Remove unnecessary `Default` impl of HandleType][7472] +- [Remove warning about missed events due to false positives][6730] +- [Render: Make Core Pipeline Graph Nodes Public][6605] +- [Render: Optimize color computation in prepare_uinodes][7311] +- [Render: Organized scene_viewer into plugins for reuse and organization][6936] +- [Render: put `update_frusta::` in `UpdateProjectionFrusta` set][7526] +- [Render: Remove dependency on the mesh struct in the pbr function][7597] +- [Render: remove potential ub in render_resource_wrapper][7279] +- [Render: Remove redundant bitwise OR `TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES`][7033] +- [Render: Remove the early exit to make sure the prepass textures are cleared][7891] +- [Render: remove the image loaded check for nodes without images in extract_uinodes][7280] +- [Render: Remove unnecessary alternate create_texture path in prepare_asset for Image][6671] +- [Render: remove unused var in fxaa shader][7509] +- [Render: set AVAILABLE_STORAGE_BUFFER_BINDINGS to the actual number of buffers available][6787] +- [Render: Use `Time` `resource` instead of `Extract`ing `Time`][7316] +- [Render: use better set inheritance in render systems][7524] +- [Render: use blendstate blend for alphamode::blend][7899] +- [Render: Use Image::default for 1 pixel white texture directly][7884] +- [Rendering: Removed `bevy_render::render_phase::DrawState`. It was not usable in any form outside of `bevy_render`.][7053] +- [Rendering: Removed `BloomSettings::scale`.][6677] +- [Rendering: Removed `EntityPhaseItem` trait][6885] +- [Rendering: Removed `ExtractedJoints`.][6833] +- [Rendering: Removed `SetShadowViewBindGroup`, `queue_shadow_view_bind_group()`, and `LightMeta::shadow_view_bind_group` in favor of reusing the prepass view bind group.][7875] +- [Rendering: Removed the `render` feature group.][6912] +- [Scene: scene viewer: can select a scene from the asset path][6859] +- [Text: Warn instead of erroring when max_font_atlases is exceeded][6673] +- [Transform: Removed `GlobalTransform::translation_mut`][7134] +- [UI: Re-enable taffy send+sync assert][7769] +- [UI: Remove `TextError::ExceedMaxTextAtlases(usize)` variant][6796] +- [UI: Remove needless manual default impl of ButtonBundle][6970] +- [UI: Removed `HorizontalAlign` and `VerticalAlign`.][6807] +- [UI: Removed `ImageMode`.][6674] +- [UI: Removed `QueuedText`][7414] +- [UI: Removed the `image_mode` field from `ImageBundle`][6674] +- [UI: Removed the `Val` <-> `f32` conversion for `CalculatedSize`.][7641] +- [Update toml_edit to 0.18][7370] +- [Update tracing-chrome requirement from 0.6.0 to 0.7.0][6709] +- [Window: Remove unnecessary windows.rs file][7277] +- [Windowing: `window.always_on_top` has been removed, you can now use `window.window_level`][7480] +- [Windowing: Removed `ModifiesWindows` system label.][7517] + +## Fixed + +- [Asset: Fix asset_debug_server hang. There should be at most one ThreadExecut…][7825] +- [Asset: fix load_internal_binary_asset with debug_asset_server][7246] +- [Assets: Hot reloading for `LoadContext::read_asset_bytes`][6797] +- [Diagnostics: Console log messages now show when the `trace_tracy` feature was enabled.][6955] +- [ECS: Fix `last_changed()` and `set_last_changed()` for `MutUntyped`][7619] +- [ECS: Fix a miscompilation with `#[derive(SystemParam)]`][7105] +- [ECS: Fix get_unchecked_manual using archetype index instead of table row.][6625] +- [ECS: Fix ignored lifetimes in `#[derive(SystemParam)]`][7458] +- [ECS: Fix init_non_send_resource overwriting previous values][7261] +- [ECS: fix mutable aliases for a very short time if `WorldCell` is already borrowed][6639] +- [ECS: Fix partially consumed `QueryIter` and `QueryCombinationIter` having invalid `size_hint`][5214] +- [ECS: Fix PipeSystem panicking with exclusive systems][6698] +- [ECS: Fix soundness bug with `World: Send`. Dropping a `World` that contains a `!Send` resource on the wrong thread will now panic.][6534] +- [ECS: Fix Sparse Change Detection][6896] +- [ECS: Fix trait bounds for run conditions][7688] +- [ECS: Fix unsoundnes in `insert` `remove` and `despawn`][7805] +- [ECS: Fix unsoundness in `EntityMut::world_scope`][7387] +- [ECS: Fixed `DetectChanges::last_changed` returning the wrong value.][7560] +- [ECS: Fixed `DetectChangesMut::set_last_changed` not actually updating the `changed` tick.][7560] +- [ECS: Fixed `Res` and `Query` parameter never being mutually exclusive.][5105] +- [ECS: Fixed a bug that caused `#[derive(SystemParam)]` to leak the types of private fields.][7056] +- [ECS: schedule_v3: fix default set for systems not being applied][7350] +- [ECS: Stageless: close the finish channel so executor doesn't deadlock][7448] +- [ECS: Stageless: fix unapplied systems][7446] +- [Hierarchy: don't error when sending HierarchyEvents when Event type not registered][7031] +- [Hierarchy: Fix unsoundness for `propagate_recursive`][7003] +- [Hierarchy: Fixed missing `ChildAdded` events][6926] +- [Input: Avoid triggering change detection for inputs][6847] +- [Input: Fix `AxisSettings::new` only accepting invalid bounds][7233] +- [Input: Fix incorrect behavior of `just_pressed` and `just_released` in `Input`][7238] +- [Input: Removed Mobile Touch event y-axis flip][6597] +- [Reflect: bevy_reflect: Fix misplaced impls][6829] +- [Reflect: Fix bug where deserializing unit structs would fail for non-self-describing formats][6722] +- [Reflect: Fix bug where scene deserialization using certain readers could fail (e.g. `BufReader`, `File`, etc.)][6894] +- [Reflect: fix typo in bevy_reflect::impls::std GetTypeRegistration for vec like…][7520] +- [Reflect: Retain `::` after `>`, `)` or bracket when shortening type names][7755] +- [Render: bevy_core_pipeline: Fix prepass sort orders][7539] +- [Render: Cam scale cluster fix][7078] +- [Render: fix ambiguities in render schedule][7725] +- [Render: fix bloom viewport][6802] +- [Render: Fix dependency of shadow mapping on the optional `PrepassPlugin`][7878] +- [Render: Fix feature gating in texture_binding_array example][7425] +- [Render: Fix material alpha_mode in example global_vs_local_translation][6658] +- [Render: fix regex for shader define: must have at least one whitespace][7754] +- [Render: fix shader_instancing][7305] +- [Render: fix spot dir nan again][7176] +- [Render: Recreate tonemapping bind group if view uniforms buffer has changed][7904] +- [Render: Shadow render phase - pass the correct view entity][7048] +- [Render: Text2d doesn't recompute text on changes to the text's bounds][7846] +- [Render: wasm: pad globals uniform also in 2d][6643] +- [Rendering: Emission strength is now correctly interpreted by the `StandardMaterial` as linear instead of sRGB.][7897] +- [Rendering: Fix deband dithering intensity for non-HDR pipelines.][6707] +- [Rendering: Fixed StandardMaterial occlusion being incorrectly applied to direct lighting.][7051] +- [Rendering: Fixed the alpha channel of the `image::DynamicImage::ImageRgb32F` to `bevy_render::texture::Image` conversion in `bevy_render::texture::Image::from_dynamic()`.][6914] +- [Scene: Cleanup dynamic scene before building][6254] +- [Task: Fix panicking on another scope][6524] +- [UI: `Size::height` sets `width` not `height`][7478] +- [UI: Don't ignore UI scale for text][7510] +- [UI: Fix `bevy_ui` compile error without `bevy_text`][7877] +- [UI: Fix overflow scaling for images][7142] +- [UI: fix upsert_leaf not setting a MeasureFunc for new leaf nodes][7351] +- [Window: Apply `WindowDescriptor` settings in all modes][6934] +- [Window: break feedback loop when moving cursor][7298] +- [Window: create window as soon as possible][7668] +- [Window: Fix a typo on `Window::set_minimized`][7276] +- [Window: Fix closing window does not exit app in desktop_app mode][7628] +- [Window: fix cursor grab issue][7010] +- [Window: Fix set_cursor_grab_mode to try an alternative mode before giving an error][6599] + +[3212]: https://github.com/bevyengine/bevy/pull/3212 +[4241]: https://github.com/bevyengine/bevy/pull/4241 +[4594]: https://github.com/bevyengine/bevy/pull/4594 +[4777]: https://github.com/bevyengine/bevy/pull/4777 +[4878]: https://github.com/bevyengine/bevy/pull/4878 +[4928]: https://github.com/bevyengine/bevy/pull/4928 +[5105]: https://github.com/bevyengine/bevy/pull/5105 +[5214]: https://github.com/bevyengine/bevy/pull/5214 +[5346]: https://github.com/bevyengine/bevy/pull/5346 +[5400]: https://github.com/bevyengine/bevy/pull/5400 +[5428]: https://github.com/bevyengine/bevy/pull/5428 +[5454]: https://github.com/bevyengine/bevy/pull/5454 +[5542]: https://github.com/bevyengine/bevy/pull/5542 +[5589]: https://github.com/bevyengine/bevy/pull/5589 +[5735]: https://github.com/bevyengine/bevy/pull/5735 +[5900]: https://github.com/bevyengine/bevy/pull/5900 +[6028]: https://github.com/bevyengine/bevy/pull/6028 +[6035]: https://github.com/bevyengine/bevy/pull/6035 +[6129]: https://github.com/bevyengine/bevy/pull/6129 +[6201]: https://github.com/bevyengine/bevy/pull/6201 +[6235]: https://github.com/bevyengine/bevy/pull/6235 +[6245]: https://github.com/bevyengine/bevy/pull/6245 +[6254]: https://github.com/bevyengine/bevy/pull/6254 +[6284]: https://github.com/bevyengine/bevy/pull/6284 +[6292]: https://github.com/bevyengine/bevy/pull/6292 +[6305]: https://github.com/bevyengine/bevy/pull/6305 +[6320]: https://github.com/bevyengine/bevy/pull/6320 +[6388]: https://github.com/bevyengine/bevy/pull/6388 +[6391]: https://github.com/bevyengine/bevy/pull/6391 +[6402]: https://github.com/bevyengine/bevy/pull/6402 +[6404]: https://github.com/bevyengine/bevy/pull/6404 +[6412]: https://github.com/bevyengine/bevy/pull/6412 +[6436]: https://github.com/bevyengine/bevy/pull/6436 +[6484]: https://github.com/bevyengine/bevy/pull/6484 +[6496]: https://github.com/bevyengine/bevy/pull/6496 +[6503]: https://github.com/bevyengine/bevy/pull/6503 +[6524]: https://github.com/bevyengine/bevy/pull/6524 +[6527]: https://github.com/bevyengine/bevy/pull/6527 +[6534]: https://github.com/bevyengine/bevy/pull/6534 +[6539]: https://github.com/bevyengine/bevy/pull/6539 +[6547]: https://github.com/bevyengine/bevy/pull/6547 +[6557]: https://github.com/bevyengine/bevy/pull/6557 +[6558]: https://github.com/bevyengine/bevy/pull/6558 +[6560]: https://github.com/bevyengine/bevy/pull/6560 +[6561]: https://github.com/bevyengine/bevy/pull/6561 +[6564]: https://github.com/bevyengine/bevy/pull/6564 +[6566]: https://github.com/bevyengine/bevy/pull/6566 +[6571]: https://github.com/bevyengine/bevy/pull/6571 +[6578]: https://github.com/bevyengine/bevy/pull/6578 +[6580]: https://github.com/bevyengine/bevy/pull/6580 +[6582]: https://github.com/bevyengine/bevy/pull/6582 +[6587]: https://github.com/bevyengine/bevy/pull/6587 +[6592]: https://github.com/bevyengine/bevy/pull/6592 +[6597]: https://github.com/bevyengine/bevy/pull/6597 +[6599]: https://github.com/bevyengine/bevy/pull/6599 +[6602]: https://github.com/bevyengine/bevy/pull/6602 +[6605]: https://github.com/bevyengine/bevy/pull/6605 +[6607]: https://github.com/bevyengine/bevy/pull/6607 +[6612]: https://github.com/bevyengine/bevy/pull/6612 +[6618]: https://github.com/bevyengine/bevy/pull/6618 +[6625]: https://github.com/bevyengine/bevy/pull/6625 +[6633]: https://github.com/bevyengine/bevy/pull/6633 +[6639]: https://github.com/bevyengine/bevy/pull/6639 +[6643]: https://github.com/bevyengine/bevy/pull/6643 +[6644]: https://github.com/bevyengine/bevy/pull/6644 +[6653]: https://github.com/bevyengine/bevy/pull/6653 +[6658]: https://github.com/bevyengine/bevy/pull/6658 +[6663]: https://github.com/bevyengine/bevy/pull/6663 +[6664]: https://github.com/bevyengine/bevy/pull/6664 +[6671]: https://github.com/bevyengine/bevy/pull/6671 +[6672]: https://github.com/bevyengine/bevy/pull/6672 +[6673]: https://github.com/bevyengine/bevy/pull/6673 +[6674]: https://github.com/bevyengine/bevy/pull/6674 +[6677]: https://github.com/bevyengine/bevy/pull/6677 +[6681]: https://github.com/bevyengine/bevy/pull/6681 +[6683]: https://github.com/bevyengine/bevy/pull/6683 +[6692]: https://github.com/bevyengine/bevy/pull/6692 +[6694]: https://github.com/bevyengine/bevy/pull/6694 +[6696]: https://github.com/bevyengine/bevy/pull/6696 +[6698]: https://github.com/bevyengine/bevy/pull/6698 +[6699]: https://github.com/bevyengine/bevy/pull/6699 +[6707]: https://github.com/bevyengine/bevy/pull/6707 +[6709]: https://github.com/bevyengine/bevy/pull/6709 +[6720]: https://github.com/bevyengine/bevy/pull/6720 +[6722]: https://github.com/bevyengine/bevy/pull/6722 +[6727]: https://github.com/bevyengine/bevy/pull/6727 +[6730]: https://github.com/bevyengine/bevy/pull/6730 +[6732]: https://github.com/bevyengine/bevy/pull/6732 +[6734]: https://github.com/bevyengine/bevy/pull/6734 +[6740]: https://github.com/bevyengine/bevy/pull/6740 +[6742]: https://github.com/bevyengine/bevy/pull/6742 +[6743]: https://github.com/bevyengine/bevy/pull/6743 +[6745]: https://github.com/bevyengine/bevy/pull/6745 +[6751]: https://github.com/bevyengine/bevy/pull/6751 +[6752]: https://github.com/bevyengine/bevy/pull/6752 +[6755]: https://github.com/bevyengine/bevy/pull/6755 +[6761]: https://github.com/bevyengine/bevy/pull/6761 +[6763]: https://github.com/bevyengine/bevy/pull/6763 +[6781]: https://github.com/bevyengine/bevy/pull/6781 +[6785]: https://github.com/bevyengine/bevy/pull/6785 +[6786]: https://github.com/bevyengine/bevy/pull/6786 +[6787]: https://github.com/bevyengine/bevy/pull/6787 +[6796]: https://github.com/bevyengine/bevy/pull/6796 +[6797]: https://github.com/bevyengine/bevy/pull/6797 +[6800]: https://github.com/bevyengine/bevy/pull/6800 +[6801]: https://github.com/bevyengine/bevy/pull/6801 +[6802]: https://github.com/bevyengine/bevy/pull/6802 +[6807]: https://github.com/bevyengine/bevy/pull/6807 +[6809]: https://github.com/bevyengine/bevy/pull/6809 +[6811]: https://github.com/bevyengine/bevy/pull/6811 +[6816]: https://github.com/bevyengine/bevy/pull/6816 +[6817]: https://github.com/bevyengine/bevy/pull/6817 +[6820]: https://github.com/bevyengine/bevy/pull/6820 +[6825]: https://github.com/bevyengine/bevy/pull/6825 +[6828]: https://github.com/bevyengine/bevy/pull/6828 +[6829]: https://github.com/bevyengine/bevy/pull/6829 +[6831]: https://github.com/bevyengine/bevy/pull/6831 +[6833]: https://github.com/bevyengine/bevy/pull/6833 +[6843]: https://github.com/bevyengine/bevy/pull/6843 +[6847]: https://github.com/bevyengine/bevy/pull/6847 +[6851]: https://github.com/bevyengine/bevy/pull/6851 +[6853]: https://github.com/bevyengine/bevy/pull/6853 +[6859]: https://github.com/bevyengine/bevy/pull/6859 +[6865]: https://github.com/bevyengine/bevy/pull/6865 +[6867]: https://github.com/bevyengine/bevy/pull/6867 +[6874]: https://github.com/bevyengine/bevy/pull/6874 +[6878]: https://github.com/bevyengine/bevy/pull/6878 +[6881]: https://github.com/bevyengine/bevy/pull/6881 +[6885]: https://github.com/bevyengine/bevy/pull/6885 +[6894]: https://github.com/bevyengine/bevy/pull/6894 +[6896]: https://github.com/bevyengine/bevy/pull/6896 +[6899]: https://github.com/bevyengine/bevy/pull/6899 +[6900]: https://github.com/bevyengine/bevy/pull/6900 +[6902]: https://github.com/bevyengine/bevy/pull/6902 +[6908]: https://github.com/bevyengine/bevy/pull/6908 +[6912]: https://github.com/bevyengine/bevy/pull/6912 +[6914]: https://github.com/bevyengine/bevy/pull/6914 +[6919]: https://github.com/bevyengine/bevy/pull/6919 +[6921]: https://github.com/bevyengine/bevy/pull/6921 +[6922]: https://github.com/bevyengine/bevy/pull/6922 +[6926]: https://github.com/bevyengine/bevy/pull/6926 +[6934]: https://github.com/bevyengine/bevy/pull/6934 +[6935]: https://github.com/bevyengine/bevy/pull/6935 +[6936]: https://github.com/bevyengine/bevy/pull/6936 +[6937]: https://github.com/bevyengine/bevy/pull/6937 +[6940]: https://github.com/bevyengine/bevy/pull/6940 +[6942]: https://github.com/bevyengine/bevy/pull/6942 +[6946]: https://github.com/bevyengine/bevy/pull/6946 +[6955]: https://github.com/bevyengine/bevy/pull/6955 +[6957]: https://github.com/bevyengine/bevy/pull/6957 +[6965]: https://github.com/bevyengine/bevy/pull/6965 +[6970]: https://github.com/bevyengine/bevy/pull/6970 +[6973]: https://github.com/bevyengine/bevy/pull/6973 +[6980]: https://github.com/bevyengine/bevy/pull/6980 +[6988]: https://github.com/bevyengine/bevy/pull/6988 +[6995]: https://github.com/bevyengine/bevy/pull/6995 +[7001]: https://github.com/bevyengine/bevy/pull/7001 +[7003]: https://github.com/bevyengine/bevy/pull/7003 +[7009]: https://github.com/bevyengine/bevy/pull/7009 +[7010]: https://github.com/bevyengine/bevy/pull/7010 +[7013]: https://github.com/bevyengine/bevy/pull/7013 +[7014]: https://github.com/bevyengine/bevy/pull/7014 +[7015]: https://github.com/bevyengine/bevy/pull/7015 +[7016]: https://github.com/bevyengine/bevy/pull/7016 +[7017]: https://github.com/bevyengine/bevy/pull/7017 +[7020]: https://github.com/bevyengine/bevy/pull/7020 +[7023]: https://github.com/bevyengine/bevy/pull/7023 +[7024]: https://github.com/bevyengine/bevy/pull/7024 +[7031]: https://github.com/bevyengine/bevy/pull/7031 +[7033]: https://github.com/bevyengine/bevy/pull/7033 +[7039]: https://github.com/bevyengine/bevy/pull/7039 +[7040]: https://github.com/bevyengine/bevy/pull/7040 +[7041]: https://github.com/bevyengine/bevy/pull/7041 +[7043]: https://github.com/bevyengine/bevy/pull/7043 +[7046]: https://github.com/bevyengine/bevy/pull/7046 +[7048]: https://github.com/bevyengine/bevy/pull/7048 +[7051]: https://github.com/bevyengine/bevy/pull/7051 +[7053]: https://github.com/bevyengine/bevy/pull/7053 +[7056]: https://github.com/bevyengine/bevy/pull/7056 +[7060]: https://github.com/bevyengine/bevy/pull/7060 +[7063]: https://github.com/bevyengine/bevy/pull/7063 +[7064]: https://github.com/bevyengine/bevy/pull/7064 +[7069]: https://github.com/bevyengine/bevy/pull/7069 +[7076]: https://github.com/bevyengine/bevy/pull/7076 +[7078]: https://github.com/bevyengine/bevy/pull/7078 +[7083]: https://github.com/bevyengine/bevy/pull/7083 +[7084]: https://github.com/bevyengine/bevy/pull/7084 +[7087]: https://github.com/bevyengine/bevy/pull/7087 +[7094]: https://github.com/bevyengine/bevy/pull/7094 +[7097]: https://github.com/bevyengine/bevy/pull/7097 +[7105]: https://github.com/bevyengine/bevy/pull/7105 +[7113]: https://github.com/bevyengine/bevy/pull/7113 +[7114]: https://github.com/bevyengine/bevy/pull/7114 +[7117]: https://github.com/bevyengine/bevy/pull/7117 +[7125]: https://github.com/bevyengine/bevy/pull/7125 +[7127]: https://github.com/bevyengine/bevy/pull/7127 +[7134]: https://github.com/bevyengine/bevy/pull/7134 +[7142]: https://github.com/bevyengine/bevy/pull/7142 +[7145]: https://github.com/bevyengine/bevy/pull/7145 +[7146]: https://github.com/bevyengine/bevy/pull/7146 +[7148]: https://github.com/bevyengine/bevy/pull/7148 +[7149]: https://github.com/bevyengine/bevy/pull/7149 +[7150]: https://github.com/bevyengine/bevy/pull/7150 +[7151]: https://github.com/bevyengine/bevy/pull/7151 +[7161]: https://github.com/bevyengine/bevy/pull/7161 +[7164]: https://github.com/bevyengine/bevy/pull/7164 +[7166]: https://github.com/bevyengine/bevy/pull/7166 +[7174]: https://github.com/bevyengine/bevy/pull/7174 +[7176]: https://github.com/bevyengine/bevy/pull/7176 +[7181]: https://github.com/bevyengine/bevy/pull/7181 +[7182]: https://github.com/bevyengine/bevy/pull/7182 +[7186]: https://github.com/bevyengine/bevy/pull/7186 +[7199]: https://github.com/bevyengine/bevy/pull/7199 +[7205]: https://github.com/bevyengine/bevy/pull/7205 +[7206]: https://github.com/bevyengine/bevy/pull/7206 +[7222]: https://github.com/bevyengine/bevy/pull/7222 +[7233]: https://github.com/bevyengine/bevy/pull/7233 +[7238]: https://github.com/bevyengine/bevy/pull/7238 +[7243]: https://github.com/bevyengine/bevy/pull/7243 +[7245]: https://github.com/bevyengine/bevy/pull/7245 +[7246]: https://github.com/bevyengine/bevy/pull/7246 +[7248]: https://github.com/bevyengine/bevy/pull/7248 +[7261]: https://github.com/bevyengine/bevy/pull/7261 +[7262]: https://github.com/bevyengine/bevy/pull/7262 +[7267]: https://github.com/bevyengine/bevy/pull/7267 +[7276]: https://github.com/bevyengine/bevy/pull/7276 +[7277]: https://github.com/bevyengine/bevy/pull/7277 +[7279]: https://github.com/bevyengine/bevy/pull/7279 +[7280]: https://github.com/bevyengine/bevy/pull/7280 +[7283]: https://github.com/bevyengine/bevy/pull/7283 +[7284]: https://github.com/bevyengine/bevy/pull/7284 +[7290]: https://github.com/bevyengine/bevy/pull/7290 +[7292]: https://github.com/bevyengine/bevy/pull/7292 +[7296]: https://github.com/bevyengine/bevy/pull/7296 +[7297]: https://github.com/bevyengine/bevy/pull/7297 +[7298]: https://github.com/bevyengine/bevy/pull/7298 +[7304]: https://github.com/bevyengine/bevy/pull/7304 +[7305]: https://github.com/bevyengine/bevy/pull/7305 +[7306]: https://github.com/bevyengine/bevy/pull/7306 +[7311]: https://github.com/bevyengine/bevy/pull/7311 +[7316]: https://github.com/bevyengine/bevy/pull/7316 +[7321]: https://github.com/bevyengine/bevy/pull/7321 +[7324]: https://github.com/bevyengine/bevy/pull/7324 +[7325]: https://github.com/bevyengine/bevy/pull/7325 +[7340]: https://github.com/bevyengine/bevy/pull/7340 +[7343]: https://github.com/bevyengine/bevy/pull/7343 +[7350]: https://github.com/bevyengine/bevy/pull/7350 +[7351]: https://github.com/bevyengine/bevy/pull/7351 +[7354]: https://github.com/bevyengine/bevy/pull/7354 +[7356]: https://github.com/bevyengine/bevy/pull/7356 +[7364]: https://github.com/bevyengine/bevy/pull/7364 +[7370]: https://github.com/bevyengine/bevy/pull/7370 +[7379]: https://github.com/bevyengine/bevy/pull/7379 +[7381]: https://github.com/bevyengine/bevy/pull/7381 +[7385]: https://github.com/bevyengine/bevy/pull/7385 +[7387]: https://github.com/bevyengine/bevy/pull/7387 +[7392]: https://github.com/bevyengine/bevy/pull/7392 +[7396]: https://github.com/bevyengine/bevy/pull/7396 +[7399]: https://github.com/bevyengine/bevy/pull/7399 +[7401]: https://github.com/bevyengine/bevy/pull/7401 +[7414]: https://github.com/bevyengine/bevy/pull/7414 +[7415]: https://github.com/bevyengine/bevy/pull/7415 +[7423]: https://github.com/bevyengine/bevy/pull/7423 +[7425]: https://github.com/bevyengine/bevy/pull/7425 +[7431]: https://github.com/bevyengine/bevy/pull/7431 +[7432]: https://github.com/bevyengine/bevy/pull/7432 +[7444]: https://github.com/bevyengine/bevy/pull/7444 +[7445]: https://github.com/bevyengine/bevy/pull/7445 +[7446]: https://github.com/bevyengine/bevy/pull/7446 +[7448]: https://github.com/bevyengine/bevy/pull/7448 +[7449]: https://github.com/bevyengine/bevy/pull/7449 +[7452]: https://github.com/bevyengine/bevy/pull/7452 +[7456]: https://github.com/bevyengine/bevy/pull/7456 +[7458]: https://github.com/bevyengine/bevy/pull/7458 +[7463]: https://github.com/bevyengine/bevy/pull/7463 +[7466]: https://github.com/bevyengine/bevy/pull/7466 +[7467]: https://github.com/bevyengine/bevy/pull/7467 +[7468]: https://github.com/bevyengine/bevy/pull/7468 +[7469]: https://github.com/bevyengine/bevy/pull/7469 +[7471]: https://github.com/bevyengine/bevy/pull/7471 +[7472]: https://github.com/bevyengine/bevy/pull/7472 +[7475]: https://github.com/bevyengine/bevy/pull/7475 +[7477]: https://github.com/bevyengine/bevy/pull/7477 +[7478]: https://github.com/bevyengine/bevy/pull/7478 +[7480]: https://github.com/bevyengine/bevy/pull/7480 +[7481]: https://github.com/bevyengine/bevy/pull/7481 +[7483]: https://github.com/bevyengine/bevy/pull/7483 +[7489]: https://github.com/bevyengine/bevy/pull/7489 +[7491]: https://github.com/bevyengine/bevy/pull/7491 +[7493]: https://github.com/bevyengine/bevy/pull/7493 +[7498]: https://github.com/bevyengine/bevy/pull/7498 +[7503]: https://github.com/bevyengine/bevy/pull/7503 +[7509]: https://github.com/bevyengine/bevy/pull/7509 +[7510]: https://github.com/bevyengine/bevy/pull/7510 +[7512]: https://github.com/bevyengine/bevy/pull/7512 +[7514]: https://github.com/bevyengine/bevy/pull/7514 +[7517]: https://github.com/bevyengine/bevy/pull/7517 +[7518]: https://github.com/bevyengine/bevy/pull/7518 +[7519]: https://github.com/bevyengine/bevy/pull/7519 +[7520]: https://github.com/bevyengine/bevy/pull/7520 +[7522]: https://github.com/bevyengine/bevy/pull/7522 +[7524]: https://github.com/bevyengine/bevy/pull/7524 +[7526]: https://github.com/bevyengine/bevy/pull/7526 +[7527]: https://github.com/bevyengine/bevy/pull/7527 +[7530]: https://github.com/bevyengine/bevy/pull/7530 +[7535]: https://github.com/bevyengine/bevy/pull/7535 +[7537]: https://github.com/bevyengine/bevy/pull/7537 +[7539]: https://github.com/bevyengine/bevy/pull/7539 +[7546]: https://github.com/bevyengine/bevy/pull/7546 +[7547]: https://github.com/bevyengine/bevy/pull/7547 +[7548]: https://github.com/bevyengine/bevy/pull/7548 +[7559]: https://github.com/bevyengine/bevy/pull/7559 +[7560]: https://github.com/bevyengine/bevy/pull/7560 +[7561]: https://github.com/bevyengine/bevy/pull/7561 +[7568]: https://github.com/bevyengine/bevy/pull/7568 +[7574]: https://github.com/bevyengine/bevy/pull/7574 +[7579]: https://github.com/bevyengine/bevy/pull/7579 +[7582]: https://github.com/bevyengine/bevy/pull/7582 +[7583]: https://github.com/bevyengine/bevy/pull/7583 +[7586]: https://github.com/bevyengine/bevy/pull/7586 +[7594]: https://github.com/bevyengine/bevy/pull/7594 +[7596]: https://github.com/bevyengine/bevy/pull/7596 +[7597]: https://github.com/bevyengine/bevy/pull/7597 +[7598]: https://github.com/bevyengine/bevy/pull/7598 +[7605]: https://github.com/bevyengine/bevy/pull/7605 +[7617]: https://github.com/bevyengine/bevy/pull/7617 +[7619]: https://github.com/bevyengine/bevy/pull/7619 +[7623]: https://github.com/bevyengine/bevy/pull/7623 +[7626]: https://github.com/bevyengine/bevy/pull/7626 +[7628]: https://github.com/bevyengine/bevy/pull/7628 +[7638]: https://github.com/bevyengine/bevy/pull/7638 +[7639]: https://github.com/bevyengine/bevy/pull/7639 +[7641]: https://github.com/bevyengine/bevy/pull/7641 +[7653]: https://github.com/bevyengine/bevy/pull/7653 +[7660]: https://github.com/bevyengine/bevy/pull/7660 +[7664]: https://github.com/bevyengine/bevy/pull/7664 +[7665]: https://github.com/bevyengine/bevy/pull/7665 +[7667]: https://github.com/bevyengine/bevy/pull/7667 +[7668]: https://github.com/bevyengine/bevy/pull/7668 +[7671]: https://github.com/bevyengine/bevy/pull/7671 +[7674]: https://github.com/bevyengine/bevy/pull/7674 +[7675]: https://github.com/bevyengine/bevy/pull/7675 +[7677]: https://github.com/bevyengine/bevy/pull/7677 +[7681]: https://github.com/bevyengine/bevy/pull/7681 +[7683]: https://github.com/bevyengine/bevy/pull/7683 +[7684]: https://github.com/bevyengine/bevy/pull/7684 +[7688]: https://github.com/bevyengine/bevy/pull/7688 +[7696]: https://github.com/bevyengine/bevy/pull/7696 +[7701]: https://github.com/bevyengine/bevy/pull/7701 +[7709]: https://github.com/bevyengine/bevy/pull/7709 +[7713]: https://github.com/bevyengine/bevy/pull/7713 +[7715]: https://github.com/bevyengine/bevy/pull/7715 +[7717]: https://github.com/bevyengine/bevy/pull/7717 +[7718]: https://github.com/bevyengine/bevy/pull/7718 +[7720]: https://github.com/bevyengine/bevy/pull/7720 +[7723]: https://github.com/bevyengine/bevy/pull/7723 +[7724]: https://github.com/bevyengine/bevy/pull/7724 +[7725]: https://github.com/bevyengine/bevy/pull/7725 +[7726]: https://github.com/bevyengine/bevy/pull/7726 +[7727]: https://github.com/bevyengine/bevy/pull/7727 +[7737]: https://github.com/bevyengine/bevy/pull/7737 +[7740]: https://github.com/bevyengine/bevy/pull/7740 +[7741]: https://github.com/bevyengine/bevy/pull/7741 +[7744]: https://github.com/bevyengine/bevy/pull/7744 +[7745]: https://github.com/bevyengine/bevy/pull/7745 +[7753]: https://github.com/bevyengine/bevy/pull/7753 +[7754]: https://github.com/bevyengine/bevy/pull/7754 +[7755]: https://github.com/bevyengine/bevy/pull/7755 +[7756]: https://github.com/bevyengine/bevy/pull/7756 +[7766]: https://github.com/bevyengine/bevy/pull/7766 +[7769]: https://github.com/bevyengine/bevy/pull/7769 +[7782]: https://github.com/bevyengine/bevy/pull/7782 +[7784]: https://github.com/bevyengine/bevy/pull/7784 +[7786]: https://github.com/bevyengine/bevy/pull/7786 +[7788]: https://github.com/bevyengine/bevy/pull/7788 +[7790]: https://github.com/bevyengine/bevy/pull/7790 +[7793]: https://github.com/bevyengine/bevy/pull/7793 +[7796]: https://github.com/bevyengine/bevy/pull/7796 +[7798]: https://github.com/bevyengine/bevy/pull/7798 +[7800]: https://github.com/bevyengine/bevy/pull/7800 +[7805]: https://github.com/bevyengine/bevy/pull/7805 +[7806]: https://github.com/bevyengine/bevy/pull/7806 +[7810]: https://github.com/bevyengine/bevy/pull/7810 +[7815]: https://github.com/bevyengine/bevy/pull/7815 +[7825]: https://github.com/bevyengine/bevy/pull/7825 +[7829]: https://github.com/bevyengine/bevy/pull/7829 +[7841]: https://github.com/bevyengine/bevy/pull/7841 +[7846]: https://github.com/bevyengine/bevy/pull/7846 +[7847]: https://github.com/bevyengine/bevy/pull/7847 +[7851]: https://github.com/bevyengine/bevy/pull/7851 +[7859]: https://github.com/bevyengine/bevy/pull/7859 +[7860]: https://github.com/bevyengine/bevy/pull/7860 +[7863]: https://github.com/bevyengine/bevy/pull/7863 +[7866]: https://github.com/bevyengine/bevy/pull/7866 +[7870]: https://github.com/bevyengine/bevy/pull/7870 +[7875]: https://github.com/bevyengine/bevy/pull/7875 +[7877]: https://github.com/bevyengine/bevy/pull/7877 +[7878]: https://github.com/bevyengine/bevy/pull/7878 +[7883]: https://github.com/bevyengine/bevy/pull/7883 +[7884]: https://github.com/bevyengine/bevy/pull/7884 +[7890]: https://github.com/bevyengine/bevy/pull/7890 +[7891]: https://github.com/bevyengine/bevy/pull/7891 +[7895]: https://github.com/bevyengine/bevy/pull/7895 +[7897]: https://github.com/bevyengine/bevy/pull/7897 +[7899]: https://github.com/bevyengine/bevy/pull/7899 +[7904]: https://github.com/bevyengine/bevy/pull/7904 + ## Version 0.9.0 (2022-11-12) ### Added From 289fd1d0f2353353f565989a2296ed1b442e00bc Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Mon, 6 Mar 2023 02:38:45 -0800 Subject: [PATCH 02/16] Fix publish license path (#7927) --- tools/publish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/publish.sh b/tools/publish.sh index fcb12fd3dc533..d7adb908d0a13 100644 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -51,8 +51,8 @@ pushd crates for crate in "${crates[@]}" do echo "Publishing ${crate}" - cp ../docs/LICENSE-MIT "$crate" - cp ../docs/LICENSE-APACHE "$crate" + cp ../LICENSE-MIT "$crate" + cp ../LICENSE-APACHE "$crate" pushd "$crate" git add LICENSE-MIT LICENSE-APACHE cargo publish --no-verify --allow-dirty From fbfd0ebca7daed1a859abf09ae7e8c1ce4bf27b1 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Sat, 11 Mar 2023 21:31:37 +1100 Subject: [PATCH 03/16] initial commit --- crates/bevy_render/src/camera/camera.rs | 47 +++++++++++++++++++++++-- crates/bevy_render/src/lib.rs | 12 ++++++- crates/bevy_render/src/view/mod.rs | 5 +-- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 27687fc863a7f..b4e4e86c022c9 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -3,6 +3,7 @@ use crate::{ prelude::Image, render_asset::RenderAssets, render_resource::TextureView, + texture::BevyDefault, view::{ColorGrading, ExtractedView, ExtractedWindows, VisibleEntities}, Extract, }; @@ -368,6 +369,24 @@ impl CameraRenderGraph { } } +/// Stores Texture Views used as render targets. +#[derive(Default, Clone, Resource)] +pub struct ManualTextureViews(HashMap); + +impl std::ops::Deref for ManualTextureViews { + type Target = HashMap; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl std::ops::DerefMut for ManualTextureViews { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} + /// The "target" that a [`Camera`] will render to. For example, this could be a [`Window`](bevy_window::Window) /// swapchain or an [`Image`]. #[derive(Debug, Clone, Reflect)] @@ -376,6 +395,8 @@ pub enum RenderTarget { Window(WindowRef), /// Image to which the camera's view is rendered. Image(Handle), + /// Texture View to which the camera's view is rendered. + TextureView(u32), } /// Normalized version of the render target. @@ -387,6 +408,8 @@ pub enum NormalizedRenderTarget { Window(NormalizedWindowRef), /// Image to which the camera's view is rendered. Image(Handle), + /// Texture View to which the camera's view is rendered. + TextureView(u32), } impl Default for RenderTarget { @@ -403,6 +426,7 @@ impl RenderTarget { .normalize(primary_window) .map(NormalizedRenderTarget::Window), RenderTarget::Image(handle) => Some(NormalizedRenderTarget::Image(handle.clone())), + RenderTarget::TextureView(id) => Some(NormalizedRenderTarget::TextureView(*id)), } } } @@ -412,6 +436,7 @@ impl NormalizedRenderTarget { &self, windows: &'a ExtractedWindows, images: &'a RenderAssets, + manual_texture_views: &'a ManualTextureViews, ) -> Option<&'a TextureView> { match self { NormalizedRenderTarget::Window(window_ref) => windows @@ -420,6 +445,9 @@ impl NormalizedRenderTarget { NormalizedRenderTarget::Image(image_handle) => { images.get(image_handle).map(|image| &image.texture_view) } + NormalizedRenderTarget::TextureView(id) => { + manual_texture_views.get(id).map(|(tex, _)| tex) + } } } @@ -436,6 +464,7 @@ impl NormalizedRenderTarget { NormalizedRenderTarget::Image(image_handle) => { images.get(image_handle).map(|image| image.texture_format) } + NormalizedRenderTarget::TextureView(_) => Some(TextureFormat::bevy_default()), } } @@ -443,6 +472,7 @@ impl NormalizedRenderTarget { &self, resolutions: impl IntoIterator, images: &Assets, + manual_texture_views: &ManualTextureViews, ) -> Option { match self { NormalizedRenderTarget::Window(window_ref) => resolutions @@ -463,6 +493,14 @@ impl NormalizedRenderTarget { scale_factor: 1.0, }) } + NormalizedRenderTarget::TextureView(id) => { + manual_texture_views + .get(id) + .map(|(_, size)| RenderTargetInfo { + physical_size: *size, + scale_factor: 1.0, + }) + } } } @@ -479,6 +517,7 @@ impl NormalizedRenderTarget { NormalizedRenderTarget::Image(image_handle) => { changed_image_handles.contains(&image_handle) } + NormalizedRenderTarget::TextureView(_) => true, } } } @@ -510,6 +549,7 @@ pub fn camera_system( primary_window: Query>, windows: Query<(Entity, &Window)>, images: Res>, + manual_texture_views: Res, mut cameras: Query<(&mut Camera, &mut T)>, ) { let primary_window = primary_window.iter().next(); @@ -541,8 +581,11 @@ pub fn camera_system( || camera_projection.is_changed() || camera.computed.old_viewport_size != viewport_size { - camera.computed.target_info = - normalized_target.get_render_target_info(&windows, &images); + camera.computed.target_info = normalized_target.get_render_target_info( + &windows, + &images, + &manual_texture_views, + ); if let Some(size) = camera.logical_viewport_size() { camera_projection.update(size.x, size.y); camera.computed.projection_matrix = camera_projection.get_projection_matrix(); diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index 783ee7cdfe447..ad0e0c51690a9 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -23,6 +23,7 @@ pub mod texture; pub mod view; use bevy_hierarchy::ValidParentCheckPlugin; +use camera::ManualTextureViews; pub use extract_param::Extract; pub mod prelude { @@ -213,6 +214,7 @@ impl Plugin for RenderPlugin { .insert_resource(adapter_info.clone()) .insert_resource(render_adapter.clone()) .init_resource::(); + app.init_resource::(); let pipeline_cache = PipelineCache::new(device.clone()); let asset_server = app.world.resource::().clone(); @@ -230,7 +232,7 @@ impl Plugin for RenderPlugin { // This set applies the commands from the extract stage while the render schedule // is running in parallel with the main app. - render_schedule.add_system(apply_extract_commands.in_set(RenderSet::ExtractCommands)); + render_schedule.add_system(apply_extract_commands.in_set(RenderSet::Prepare)); render_schedule.add_system( PipelineCache::process_pipeline_queue_system @@ -251,6 +253,7 @@ impl Plugin for RenderPlugin { .insert_resource(adapter_info) .insert_resource(pipeline_cache) .insert_resource(asset_server); + render_app.add_system(extract_manual_texture_views.in_set(RenderSet::ExtractCommands)); let (sender, receiver) = bevy_time::create_time_channels(); app.insert_resource(receiver); @@ -325,6 +328,13 @@ fn extract(main_world: &mut World, render_app: &mut App) { main_world.insert_resource(ScratchMainWorld(scratch_world)); } +fn extract_manual_texture_views( + manual_texture_views: Extract>, + mut commands: Commands, +) { + commands.insert_resource(manual_texture_views.clone()); +} + /// Applies the commands from the extract schedule. This happens during /// the render schedule rather than during extraction to allow the commands to run in parallel with the /// main app when pipelined rendering is enabled. diff --git a/crates/bevy_render/src/view/mod.rs b/crates/bevy_render/src/view/mod.rs index 2a15363fdaf31..ffcdc4d251d7b 100644 --- a/crates/bevy_render/src/view/mod.rs +++ b/crates/bevy_render/src/view/mod.rs @@ -6,7 +6,7 @@ pub use visibility::*; pub use window::*; use crate::{ - camera::ExtractedCamera, + camera::{ExtractedCamera, ManualTextureViews}, extract_resource::{ExtractResource, ExtractResourcePlugin}, prelude::{Image, Shader}, render_asset::RenderAssets, @@ -360,12 +360,13 @@ fn prepare_view_targets( render_device: Res, mut texture_cache: ResMut, cameras: Query<(Entity, &ExtractedCamera, &ExtractedView)>, + manual_texture_views: Res, ) { let mut textures = HashMap::default(); for (entity, camera, view) in cameras.iter() { if let (Some(target_size), Some(target)) = (camera.physical_target_size, &camera.target) { if let (Some(out_texture_view), Some(out_texture_format)) = ( - target.get_texture_view(&windows, &images), + target.get_texture_view(&windows, &images, &manual_texture_views), target.get_texture_format(&windows, &images), ) { let size = Extent3d { From 840433e38c5c968b177f98af138308e1b3a4ac5c Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Sat, 11 Mar 2023 22:03:13 +1100 Subject: [PATCH 04/16] fix: mistake --- crates/bevy_render/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index ad0e0c51690a9..776785b9554da 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -232,7 +232,7 @@ impl Plugin for RenderPlugin { // This set applies the commands from the extract stage while the render schedule // is running in parallel with the main app. - render_schedule.add_system(apply_extract_commands.in_set(RenderSet::Prepare)); + render_schedule.add_system(apply_extract_commands.in_set(RenderSet::ExtractCommands)); render_schedule.add_system( PipelineCache::process_pipeline_queue_system From 75f2ae2a6057699be9914ed25ed758094f206663 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Sat, 11 Mar 2023 22:06:54 +1100 Subject: [PATCH 05/16] refactor: use ExtractResource --- crates/bevy_render/src/camera/camera.rs | 3 ++- crates/bevy_render/src/camera/mod.rs | 9 +++++++-- crates/bevy_render/src/lib.rs | 10 ---------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index b4e4e86c022c9..620737993afda 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -22,6 +22,7 @@ use bevy_log::warn; use bevy_math::{Mat4, Ray, UVec2, UVec4, Vec2, Vec3}; use bevy_reflect::prelude::*; use bevy_reflect::FromReflect; +use bevy_render_macros::ExtractResource; use bevy_transform::components::GlobalTransform; use bevy_utils::{HashMap, HashSet}; use bevy_window::{ @@ -370,7 +371,7 @@ impl CameraRenderGraph { } /// Stores Texture Views used as render targets. -#[derive(Default, Clone, Resource)] +#[derive(Default, Clone, Resource, ExtractResource)] pub struct ManualTextureViews(HashMap); impl std::ops::Deref for ManualTextureViews { diff --git a/crates/bevy_render/src/camera/mod.rs b/crates/bevy_render/src/camera/mod.rs index 91ea69d9417c7..5465a50c790de 100644 --- a/crates/bevy_render/src/camera/mod.rs +++ b/crates/bevy_render/src/camera/mod.rs @@ -7,7 +7,10 @@ pub use camera::*; pub use camera_driver_node::*; pub use projection::*; -use crate::{render_graph::RenderGraph, ExtractSchedule, RenderApp, RenderSet}; +use crate::{ + extract_resource::ExtractResourcePlugin, render_graph::RenderGraph, ExtractSchedule, RenderApp, + RenderSet, +}; use bevy_app::{App, IntoSystemAppConfig, Plugin}; use bevy_ecs::schedule::IntoSystemConfig; @@ -22,9 +25,11 @@ impl Plugin for CameraPlugin { .register_type::() .register_type::() .register_type::() + .init_resource::() .add_plugin(CameraProjectionPlugin::::default()) .add_plugin(CameraProjectionPlugin::::default()) - .add_plugin(CameraProjectionPlugin::::default()); + .add_plugin(CameraProjectionPlugin::::default()) + .add_plugin(ExtractResourcePlugin::::default()); if let Ok(render_app) = app.get_sub_app_mut(RenderApp) { render_app diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index 776785b9554da..783ee7cdfe447 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -23,7 +23,6 @@ pub mod texture; pub mod view; use bevy_hierarchy::ValidParentCheckPlugin; -use camera::ManualTextureViews; pub use extract_param::Extract; pub mod prelude { @@ -214,7 +213,6 @@ impl Plugin for RenderPlugin { .insert_resource(adapter_info.clone()) .insert_resource(render_adapter.clone()) .init_resource::(); - app.init_resource::(); let pipeline_cache = PipelineCache::new(device.clone()); let asset_server = app.world.resource::().clone(); @@ -253,7 +251,6 @@ impl Plugin for RenderPlugin { .insert_resource(adapter_info) .insert_resource(pipeline_cache) .insert_resource(asset_server); - render_app.add_system(extract_manual_texture_views.in_set(RenderSet::ExtractCommands)); let (sender, receiver) = bevy_time::create_time_channels(); app.insert_resource(receiver); @@ -328,13 +325,6 @@ fn extract(main_world: &mut World, render_app: &mut App) { main_world.insert_resource(ScratchMainWorld(scratch_world)); } -fn extract_manual_texture_views( - manual_texture_views: Extract>, - mut commands: Commands, -) { - commands.insert_resource(manual_texture_views.clone()); -} - /// Applies the commands from the extract schedule. This happens during /// the render schedule rather than during extraction to allow the commands to run in parallel with the /// main app when pipelined rendering is enabled. From 06c18595ae04a64aab699fe61ecb165e21071904 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Sat, 11 Mar 2023 23:31:13 +1100 Subject: [PATCH 06/16] camera system: allow too many arguments --- crates/bevy_render/src/camera/camera.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 620737993afda..2041ac149c25a 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -543,6 +543,7 @@ impl NormalizedRenderTarget { /// [`PerspectiveProjection`]: crate::camera::PerspectiveProjection /// [`Projection`]: crate::camera::Projection /// [`CoreSet::PostUpdate`]: bevy_app::CoreSet::PostUpdate +#[allow(clippy::too_many_arguments)] pub fn camera_system( mut window_resized_events: EventReader, mut window_created_events: EventReader, From 1e4cfec47dffc22893554936547993477ef41d97 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 22 Mar 2023 16:01:58 +1100 Subject: [PATCH 07/16] fix: use ExtractResourcePlugin --- crates/bevy_render/src/camera/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/bevy_render/src/camera/mod.rs b/crates/bevy_render/src/camera/mod.rs index 7f9aaf85313db..3423b4a92105e 100644 --- a/crates/bevy_render/src/camera/mod.rs +++ b/crates/bevy_render/src/camera/mod.rs @@ -7,7 +7,10 @@ pub use camera::*; pub use camera_driver_node::*; pub use projection::*; -use crate::{render_graph::RenderGraph, ExtractSchedule, Render, RenderApp, RenderSet}; +use crate::{ + extract_resource::ExtractResourcePlugin, render_graph::RenderGraph, ExtractSchedule, Render, + RenderApp, RenderSet, +}; use bevy_app::{App, Plugin}; use bevy_ecs::schedule::IntoSystemConfigs; From be5b7056ac101d2e6f84239ffd296d82fa3679fc Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 24 May 2023 14:51:15 +1000 Subject: [PATCH 08/16] remove comment from a different pr. --- crates/bevy_render/src/camera/camera.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 16236d02e12b6..efe304d61f68d 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -542,7 +542,6 @@ impl NormalizedRenderTarget { /// [`OrthographicProjection`]: crate::camera::OrthographicProjection /// [`PerspectiveProjection`]: crate::camera::PerspectiveProjection /// [`Projection`]: crate::camera::Projection -/// [`CoreSet::PostUpdate`]: bevy_app::CoreSet::PostUpdate #[allow(clippy::too_many_arguments)] pub fn camera_system( mut window_resized_events: EventReader, From 020bb8a5a54259072f2f7340ffc0945874e4d6d6 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 24 May 2023 15:07:50 +1000 Subject: [PATCH 09/16] clarify `ManualTextureView` documentation --- crates/bevy_render/src/camera/camera.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index efe304d61f68d..8bf52993013df 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -370,7 +370,7 @@ impl CameraRenderGraph { } } -/// Stores Texture Views used as render targets. +/// Stores [`TextureView`]s for use as a [`RenderTarget`], along with their size as a [`UVec2`]. #[derive(Default, Clone, Resource, ExtractResource)] pub struct ManualTextureViews(HashMap); From 2c7bb88c07f344f4687e73aaa63bde88c52927c0 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 24 May 2023 15:32:27 +1000 Subject: [PATCH 10/16] feat: use `ManualTextureViewHandle` wrapper type --- crates/bevy_render/src/camera/camera.rs | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 8bf52993013df..592e05f6db559 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -370,12 +370,29 @@ impl CameraRenderGraph { } } +#[derive( + Default, + Debug, + Clone, + Copy, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + Component, + Reflect, + FromReflect, +)] +#[reflect(Component, Default)] +pub struct ManualTextureViewHandle(pub u32); + /// Stores [`TextureView`]s for use as a [`RenderTarget`], along with their size as a [`UVec2`]. #[derive(Default, Clone, Resource, ExtractResource)] -pub struct ManualTextureViews(HashMap); +pub struct ManualTextureViews(HashMap); impl std::ops::Deref for ManualTextureViews { - type Target = HashMap; + type Target = HashMap; fn deref(&self) -> &Self::Target { &self.0 @@ -397,7 +414,7 @@ pub enum RenderTarget { /// Image to which the camera's view is rendered. Image(Handle), /// Texture View to which the camera's view is rendered. - TextureView(u32), + TextureView(ManualTextureViewHandle), } /// Normalized version of the render target. @@ -410,7 +427,7 @@ pub enum NormalizedRenderTarget { /// Image to which the camera's view is rendered. Image(Handle), /// Texture View to which the camera's view is rendered. - TextureView(u32), + TextureView(ManualTextureViewHandle), } impl Default for RenderTarget { From c961d734fc08a4508c158aae967de8b347525b52 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 24 May 2023 15:47:13 +1000 Subject: [PATCH 11/16] add documentation for `ManualTextureViewHandle` --- crates/bevy_render/src/camera/camera.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 592e05f6db559..b7bbff3191bbc 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -370,6 +370,7 @@ impl CameraRenderGraph { } } +/// A unique id that corresponds to a specific [`TextureView`] in the [`ManualTextureViews`] collection. #[derive( Default, Debug, From cf890bbcf55867162afd0781034fa6bc2968e89b Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Tue, 30 May 2023 10:08:01 +1000 Subject: [PATCH 12/16] feat: `ManualTextureView` struct includes format --- crates/bevy_render/src/camera/camera.rs | 57 +++-------------- .../src/camera/manual_texture_view.rs | 64 +++++++++++++++++++ crates/bevy_render/src/camera/mod.rs | 2 + crates/bevy_render/src/view/mod.rs | 2 +- 4 files changed, 77 insertions(+), 48 deletions(-) create mode 100644 crates/bevy_render/src/camera/manual_texture_view.rs diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index b7bbff3191bbc..987ee973c9d3c 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -1,9 +1,9 @@ use crate::{ camera::CameraProjection, + camera::{ManualTextureViewHandle, ManualTextureViews}, prelude::Image, render_asset::RenderAssets, render_resource::TextureView, - texture::BevyDefault, view::{ColorGrading, ExtractedView, ExtractedWindows, VisibleEntities}, Extract, }; @@ -22,13 +22,11 @@ use bevy_log::warn; use bevy_math::{Mat4, Ray, UVec2, UVec4, Vec2, Vec3}; use bevy_reflect::prelude::*; use bevy_reflect::FromReflect; -use bevy_render_macros::ExtractResource; use bevy_transform::components::GlobalTransform; use bevy_utils::{HashMap, HashSet}; use bevy_window::{ NormalizedWindowRef, PrimaryWindow, Window, WindowCreated, WindowRef, WindowResized, }; - use std::{borrow::Cow, ops::Range}; use wgpu::{BlendState, Extent3d, LoadOp, TextureFormat}; @@ -370,42 +368,6 @@ impl CameraRenderGraph { } } -/// A unique id that corresponds to a specific [`TextureView`] in the [`ManualTextureViews`] collection. -#[derive( - Default, - Debug, - Clone, - Copy, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - Component, - Reflect, - FromReflect, -)] -#[reflect(Component, Default)] -pub struct ManualTextureViewHandle(pub u32); - -/// Stores [`TextureView`]s for use as a [`RenderTarget`], along with their size as a [`UVec2`]. -#[derive(Default, Clone, Resource, ExtractResource)] -pub struct ManualTextureViews(HashMap); - -impl std::ops::Deref for ManualTextureViews { - type Target = HashMap; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl std::ops::DerefMut for ManualTextureViews { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} - /// The "target" that a [`Camera`] will render to. For example, this could be a [`Window`](bevy_window::Window) /// swapchain or an [`Image`]. #[derive(Debug, Clone, Reflect)] @@ -465,7 +427,7 @@ impl NormalizedRenderTarget { images.get(image_handle).map(|image| &image.texture_view) } NormalizedRenderTarget::TextureView(id) => { - manual_texture_views.get(id).map(|(tex, _)| tex) + manual_texture_views.get(id).map(|tex| &tex.texture_view) } } } @@ -475,6 +437,7 @@ impl NormalizedRenderTarget { &self, windows: &'a ExtractedWindows, images: &'a RenderAssets, + manual_texture_views: &'a ManualTextureViews, ) -> Option { match self { NormalizedRenderTarget::Window(window_ref) => windows @@ -483,7 +446,9 @@ impl NormalizedRenderTarget { NormalizedRenderTarget::Image(image_handle) => { images.get(image_handle).map(|image| image.texture_format) } - NormalizedRenderTarget::TextureView(_) => Some(TextureFormat::bevy_default()), + NormalizedRenderTarget::TextureView(id) => { + manual_texture_views.get(id).map(|tex| tex.format) + } } } @@ -513,12 +478,10 @@ impl NormalizedRenderTarget { }) } NormalizedRenderTarget::TextureView(id) => { - manual_texture_views - .get(id) - .map(|(_, size)| RenderTargetInfo { - physical_size: *size, - scale_factor: 1.0, - }) + manual_texture_views.get(id).map(|tex| RenderTargetInfo { + physical_size: tex.size, + scale_factor: 1.0, + }) } } } diff --git a/crates/bevy_render/src/camera/manual_texture_view.rs b/crates/bevy_render/src/camera/manual_texture_view.rs new file mode 100644 index 0000000000000..ca35c14b87842 --- /dev/null +++ b/crates/bevy_render/src/camera/manual_texture_view.rs @@ -0,0 +1,64 @@ +use crate::extract_resource::ExtractResource; +use crate::render_resource::TextureView; +use crate::texture::BevyDefault; +use bevy_ecs::system::Resource; +use bevy_ecs::{prelude::Component, reflect::ReflectComponent}; +use bevy_math::UVec2; +use bevy_reflect::prelude::*; +use bevy_reflect::FromReflect; +use bevy_utils::HashMap; +use wgpu::TextureFormat; + +/// A unique id that corresponds to a specific [`ManualTextureView`] in the [`ManualTextureViews`] collection. +#[derive( + Default, + Debug, + Clone, + Copy, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + Component, + Reflect, + FromReflect, +)] +#[reflect(Component, Default)] +pub struct ManualTextureViewHandle(pub u32); + +/// A manually managed [`TextureView`] for use as a [`crate::camera::RenderTarget`]. +#[derive(Debug, Clone, Component)] +pub struct ManualTextureView { + pub texture_view: TextureView, + pub size: UVec2, + pub format: TextureFormat, +} + +impl ManualTextureView { + pub fn with_default_format(texture_view: TextureView, size: UVec2) -> Self { + Self { + texture_view, + size, + format: TextureFormat::bevy_default(), + } + } +} + +/// Stores manually managed [`ManualTextureView`]s for use as a [`crate::camera::RenderTarget`]. +#[derive(Default, Clone, Resource, ExtractResource)] +pub struct ManualTextureViews(HashMap); + +impl std::ops::Deref for ManualTextureViews { + type Target = HashMap; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl std::ops::DerefMut for ManualTextureViews { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} diff --git a/crates/bevy_render/src/camera/mod.rs b/crates/bevy_render/src/camera/mod.rs index 3423b4a92105e..3829d392c0311 100644 --- a/crates/bevy_render/src/camera/mod.rs +++ b/crates/bevy_render/src/camera/mod.rs @@ -1,10 +1,12 @@ #[allow(clippy::module_inception)] mod camera; mod camera_driver_node; +mod manual_texture_view; mod projection; pub use camera::*; pub use camera_driver_node::*; +pub use manual_texture_view::*; pub use projection::*; use crate::{ diff --git a/crates/bevy_render/src/view/mod.rs b/crates/bevy_render/src/view/mod.rs index 76a23b403c15d..fd8d00ac15811 100644 --- a/crates/bevy_render/src/view/mod.rs +++ b/crates/bevy_render/src/view/mod.rs @@ -381,7 +381,7 @@ fn prepare_view_targets( if let (Some(target_size), Some(target)) = (camera.physical_target_size, &camera.target) { if let (Some(out_texture_view), Some(out_texture_format)) = ( target.get_texture_view(&windows, &images, &manual_texture_views), - target.get_texture_format(&windows, &images), + target.get_texture_format(&windows, &images, &manual_texture_views), ) { let size = Extent3d { width: target_size.x, From 8a72838f60f32cc5398546733258f9fb64bce4dc Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 14 Jun 2023 09:06:58 +1000 Subject: [PATCH 13/16] Update crates/bevy_render/src/camera/camera.rs Co-authored-by: Paul Hansen --- crates/bevy_render/src/camera/camera.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 987ee973c9d3c..29878ec3e3165 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -377,6 +377,7 @@ pub enum RenderTarget { /// Image to which the camera's view is rendered. Image(Handle), /// Texture View to which the camera's view is rendered. + /// Useful when the texture view needs to be created outside of Bevy, for example OpenXR. TextureView(ManualTextureViewHandle), } From 461573bac5c2a288823df19346e5621f7ecd7f19 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 14 Jun 2023 09:07:05 +1000 Subject: [PATCH 14/16] Update crates/bevy_render/src/camera/camera.rs Co-authored-by: Paul Hansen --- crates/bevy_render/src/camera/camera.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 29878ec3e3165..73b5e856fdb4f 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -391,6 +391,7 @@ pub enum NormalizedRenderTarget { /// Image to which the camera's view is rendered. Image(Handle), /// Texture View to which the camera's view is rendered. + /// Useful when the texture view needs to be created outside of Bevy, for example OpenXR. TextureView(ManualTextureViewHandle), } From 86cda458c79606372794a81c62b4b3e6072ff045 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 14 Jun 2023 14:33:11 +1000 Subject: [PATCH 15/16] Update crates/bevy_render/src/camera/camera.rs Co-authored-by: Paul Hansen --- crates/bevy_render/src/camera/camera.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 73b5e856fdb4f..8a8bb77874e72 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -391,7 +391,7 @@ pub enum NormalizedRenderTarget { /// Image to which the camera's view is rendered. Image(Handle), /// Texture View to which the camera's view is rendered. - /// Useful when the texture view needs to be created outside of Bevy, for example OpenXR. + /// Useful when the texture view needs to be created outside of Bevy, for example OpenXR. TextureView(ManualTextureViewHandle), } From 4f9075fe9337b6a2806dac8e149523bf5656f389 Mon Sep 17 00:00:00 2001 From: Peter Hayman Date: Wed, 14 Jun 2023 14:33:18 +1000 Subject: [PATCH 16/16] Update crates/bevy_render/src/camera/camera.rs Co-authored-by: Paul Hansen --- crates/bevy_render/src/camera/camera.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_render/src/camera/camera.rs b/crates/bevy_render/src/camera/camera.rs index 8a8bb77874e72..d014acc6590b8 100644 --- a/crates/bevy_render/src/camera/camera.rs +++ b/crates/bevy_render/src/camera/camera.rs @@ -377,7 +377,7 @@ pub enum RenderTarget { /// Image to which the camera's view is rendered. Image(Handle), /// Texture View to which the camera's view is rendered. - /// Useful when the texture view needs to be created outside of Bevy, for example OpenXR. + /// Useful when the texture view needs to be created outside of Bevy, for example OpenXR. TextureView(ManualTextureViewHandle), }