Commit Graph

9237 Commits

Author SHA1 Message Date
dependabot[bot]
0a95597c9d
Update meshopt requirement from 0.4.1 to 0.5.0
Updates the requirements on [meshopt](https://github.com/gwihlidal/meshopt-rs) to permit the latest version.
- [Release notes](https://github.com/gwihlidal/meshopt-rs/releases)
- [Changelog](https://github.com/gwihlidal/meshopt-rs/blob/master/CHANGES.md)
- [Commits](https://github.com/gwihlidal/meshopt-rs/compare/v0.4.1...v0.5.0)

---
updated-dependencies:
- dependency-name: meshopt
  dependency-version: 0.5.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-07 20:48:19 +00:00
atlv
e2810085a8
remove unused dependencies (#19998)
# Objective

- dont depend on things we dont need tp

## Solution

- just dont do it

## Testing

- 3d_scene runs
2025-07-07 20:10:33 +00:00
ickshonpe
5ea0e4004f
HSL and HSV interpolation for UI gradients (#19992)
# Objective

Add interpolation in HSL and HSV colour spaces for UI gradients.

## Solution
Added new variants to `InterpolationColorSpace`: `Hsl`, `HslLong`,
`Hsv`, and `HsvLong`, along with mix functions to the `gradients` shader
for each of them.

#### Limitations
* Didn't include increasing and decreasing path support, it's not
essential and can be done in a follow up if someone feels like it.

* The colour conversions should really be performed before the colours
are sent to the shader but it would need more changes and performance is
good enough for now.

## Testing

```cargo run --example gradients```
2025-07-07 20:08:51 +00:00
Zeenobit
12da4e482a
Add parent ID to the B0004 log message (#19980)
# Objective

Minor CL to add parent entity ID to the B0004 error message to improve
debugging.
2025-07-07 20:04:59 +00:00
JaySpruce
eb6afd26a1
Avoid early function invocation in EntityEntryCommands (#19978)
## Objective

Fixes #19884.

## Solution

- Add an internal entity command `insert_with`, which takes a function
returning a component and checks if the component would actually be
inserted before invoking the function.
- Add the same check to `insert_from_world`, since it's a similar
situation.
- Update the `or_insert_with`, `or_try_insert_with`, and `or_default`
methods on `EntityEntryCommands` to use the new command.

Since the function/closure returning the component now needs to be sent
into the command (rather than being invoked before the command is
created), the function now has `Send + 'static` bounds. Pretty typical
for command stuff, but I don't know how/if it'll affect existing users.

---------

Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
2025-07-07 20:02:55 +00:00
TimJentzsch
b0df3fb4d0
Document why examples are disabled on the web, pass 1 (#19262)
# Objective

With the Bevy CLI, we now have an easy way to locally test if examples
work on the web.
We should start to explicitly document why examples don't work on the
web to keep track and to ensure that as many examples are enabled as
possible.

## Solution

- Go through the examples with `wasm = false` and check if they really
don't work
- If they don't work, try to figure out why by looking through the code
and announcement posts (we need better docs for this please) and add a
comment explaining it
- The `lightmap` example seemed to work without problems, so I enabled
it

## Testing

Install the [Bevy CLI](https://github.com/TheBevyFlock/bevy_cli) and
run:

```
bevy run --example={example_name} web --open
```

# Future Work

- There are about 100 more examples with `wasm = false` that also need
to be documeneted
- Also improve the documentation on the related features/plugins/types
to make it easier for users to determine what they can use

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: IceSentry <IceSentry@users.noreply.github.com>
2025-07-07 20:02:21 +00:00
stevehello166
6729208d39
Implement display for direction (#19942)
# Objective
To implement fmt::Display for the direction types. The reason that this
would be a good addition is that I often find myself using println! to
debug things with directions and adding the extra ":?" was getting a
little annoying. It would also be better for any potential CLI apps that
might need to output a direction.

## Solution
Copied glam's implementation of Display for each length of direction.
I.E Vec3's display for Dir3.

## Testing

- Did you test these changes? If so, how?
Yes, I wrote a little script that printed out the different directions
and compared it to their vector counterparts.
Here it is if anyone's interested
```
use bevy_math::*;

fn main() {
    let dir2 = Dir2::from_xy(0.0, 1.0).unwrap();
    let dir3 = Dir3::from_xyz(0.0, 1.0, 0.0).unwrap();
    let dir3a = Dir3A::from_xyz(0.0, 1.0, 0.0).unwrap();
    let dir4 = Dir4::from_xyzw(0.0, 1.0, 0.0, 0.0).unwrap();
    let vec2 = Vec2::new(0.0, 1.0);
    let vec3 = Vec3::new(0.0, 1.0, 0.0);
    let vec4 = Vec4::new(0.0, 1.0, 0.0, 1.0);
    println!("{dir2} {dir3} {dir3a} {dir4}");
    println!("{vec2}, {vec3}, {vec4}")
}
```
- Are there any parts that need more testing?
Perhaps
2025-07-07 20:00:37 +00:00
eugineerd
3b6d01972b
Unify filtering by id in EntityClonerBuilder (#19977)
# Objective
#19649 introduced new `*_if_new` and `*_by_bundle_id_*` variations to
`EntityClonerBuilder` filtering functionality, which resulted in
increase in method permutations - there are now 8 allow variants to
support various id types and 2 different insert modes.

## Solution
This PR introduces a new trait `FilterableIds` to unify all id types and
their `IntoIterator` implementations, which is somewhat similar to
`WorldEntityFetch`. It supports `TypeId`, `ComponentId` and `BundleId`,
allowing us to reduce the number of `allow` methods to 4: `allow`,
`allow_if_new`, `allow_by_ids`, `allow_by_ids_if_new`. The function
signature is a bit less readable now, but the docs mention types that
can be passed in.

## Testing
All existing tests pass, performance is unchanged.

---------

Co-authored-by: urben1680 <55257931+urben1680@users.noreply.github.com>
2025-07-07 20:00:37 +00:00
Nicholas Nethercote
d80078cf2d
bevy_reflect: Introduce reflect_clone_and_take. (#19944)
# Objective

There is a pattern that appears in multiple places, involving
`reflect_clone`, followed by `take`, followed by `map_err` that produces
a `FailedDowncast` in a particular form.

## Solution

Introduces `reflect_clone_and_take`, which factors out the repeated
code.

## Testing

`cargo run -p ci`

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-07 19:57:29 +00:00
Nicholas Nethercote
f1df61e458
bevy_reflect: Avoid trait bounds on non-generic types (#19929)
# Objective

All the derived reflection methods currently have multiple trait bounds
on non-generic field types, which serve no purpose. The are emitted
because "emit bounds on all fields" is easier than "emit bounds on
fields that need them". But improving things isn't too hard.

Similarly, lots of useless `Any + Send + Sync` bounds exist on
non-generic types.

Helps a lot with #19873.

## Solution

Remove the unnecessary bounds by only emitting them if the relevant type
is generic.

## Testing

I used `cargo expand` to confirm the unnecessary bounds are no longer
produced.

`-Zmacro-stats` output tells me this reduces the size of the `Reflect`
code produced for `bevy_ui` by 21.2%.
2025-07-07 19:53:14 +00:00
Wuketuke
f09c3a1a56
doc improvement for StateTransition (#19597)
Fixes #19594
The exact problem is described in that issue.
I improved the docs to guide anyone who has the the same issue I had.
I kept myself minimal, since the problem is relatively niche, hopefully
it will be enough if anyone else has that problem
2025-07-07 19:51:46 +00:00
Wuketuke
4865c538b1
SpatialListener now requires a Transform (#19357)
I noticed that the `SpatialListener` asks to have a `Transform`
attached. It seemed weird that we didnt just use a require macro, so i
went ahead and did that
I also tweaked the system that plays audio to use a `&GlobalTransform`
instead of an `Option<&GlobalTransform>`
2025-07-07 19:48:57 +00:00
Fallible Things
3ad7a75781
Explanation for the '3d shapes' example (#19295)
[Explanation](https://bevyengine.org/learn/contribute/helping-out/explaining-examples/)
for the 3d shapes example.

This shares a lot of detail with the [2d
shapes](https://github.com/bevyengine/bevy/pull/19211) example, so it's
similar in structure. The explanation for why asset handles are not
components has been copied over for now with minor adjustment, I'll do
another editing pass on this to make it match the surrounding context
and focus before taking it out of drafts.

---------

Co-authored-by: theotherphil <phil.j.ellison@gmail.com>
Co-authored-by: Carter Weinberg <weinbergcarter@gmail.com>
2025-07-07 19:47:19 +00:00
Lucas Franca
80b059c815
Extract members of PickingPlugin and PointerInputPlugin into new types (#19078)
# Objective

`PickingPlugin` and `PointerInputPlugin` were kinda weird being both a
plugin and a resource.

## Solution

Extract the resource functionality of `PickingPlugin` and
`PointerInputPlugin` into new resources

## Testing

`mesh_picking` and `sprite_picking`

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
2025-07-07 19:40:25 +00:00
Gilles Henaux
ca25a67d0d
Fix the extended_material example on WebGL2 (#18812)
# Objective

- Fixes #13872 (also mentioned in #17167)

## Solution

- Added conditional padding fields to the shader uniform

## Alternatives

### 1- Use a UVec4

Replace the `u32` field in `MyExtension` by a `UVec4` and only use the
`x` coordinate.

(This was the original approach, but for consistency with the rest of
the codebase, separate padding fields seem to be preferred)

### 2- Don't fix it, unlist it

While the fix is quite simple, it does muddy the waters a tiny bit due
to `quantize_steps` now being a UVec4 instead of a simple u32. We could
simply remove this example from the examples that support WebGL2.

## Testing

- Ran the example locally on WebGL2 (and native Vulkan) successfully
2025-07-07 19:34:12 +00:00
Greeble
0f75142560
Add test for invalid skinned meshes (#18763)
## Objective

Add a test that would have caught #16929 and #18712.

## Solution

The PR adds a `test_invalid_skinned_mesh` example that creates various
valid and invalid skinned meshes. This is designed to catch panics via
CI, and can be inspected visually. It also tests skinned meshes + motion
blur.


![417958065-37df8799-b068-48b8-87a4-1f144e883c9c](https://github.com/user-attachments/assets/22b2fa42-628b-48a4-9013-76d6524cecf5)

The screenshot shows all the tests, but two are currently disabled as
they cause panics. #18074 will re-enable them.

### Concerns

- The test is not currently suitable for screenshot comparison.
- I didn't add the test to CI. I'm a bit unsure if this should be part
of the PR or a follow up discussion.
- Visual inspection requires understanding why some meshes are
deliberately broken and what that looks like.
- I wasn't sure about naming conventions. I put `test` in the name so
it's not confused with a real example.

## Testing

```
cargo run --example test_invalid_skinned_mesh
```

Tested on Win10/Nvidia, across Vulkan, WebGL/Chrome, WebGPU/Chrome.
2025-07-07 19:28:52 +00:00
Nicky Fahey
831073105f
Add comment to custom vertex attribute example to make it easier to convert to 2D (#18603)
# Objective

- It's not clear what changes are needed to the shader to convert the
example to 2D.
- If you leave the shader unchanged you get a very confusing error (see
linked issue).
- Fixes #14077

## Solution

A separate example probably isn't needed as there is little difference
between 3D and 2D, but a note saying what changes are needed to the
shader would make it a lot easier.

Let me know if you think it is also worth adding some notes to the rust
file, but it is mostly trivial changes such as changing `Mesh3d` to
`Mesh2d`. I have left the original code in comments next to the changes
in the gist linked at the bottom if you wish to compare.

## Testing

- I just spent a long time working it out the hard way. This would have
made it a lot quicker.
- I have tested the 2D version of the shader with the changes explained
in the suggested comment and it works as expected.
- For testing purposes [here is a complete working 2D
example](https://gist.github.com/nickyfahey/647e2a2c45e695f24e288432b811dfc2).
(note that as per the original example the shader file needs to go in
'assets/shaders/')
2025-07-07 19:26:37 +00:00
atlv
cb227b1e03
make optional crates for mesh, camera, and light (#19997)
# Objective

- nice bevy::camera bevy::mesh bevy::light imports
- skip bevy_light in 2d

## Solution

- add optional crates to internal
- make light only included when building pbr

## Testing

- 3d_scene
2025-07-07 07:35:32 +00:00
atlv
1fb5a62297
fix meshlets with charlotte (#19996)
# Objective

- fix meshlets not finding entrypoint and crashing

# Solution

- remove faulty ifdefs
2025-07-07 03:47:14 +00:00
Connor Dalrymple
905965b842
Skip allocation of zero size meshes (#19938)
# Objective

Fixes #16525
Fixes #19710

## Solution

Not allocating a mesh if it is empty.

## Testing

I tested using the following minimum repro from #16525
```rust
use bevy::{asset::RenderAssetUsages, prelude::*, render::mesh::PrimitiveTopology};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Startup, setup)
        .run();
}

fn setup(
    mut commands: Commands,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<ColorMaterial>>,
) {
    commands.spawn(Camera2d);

    let mesh = Mesh::new(
        PrimitiveTopology::TriangleList,
        RenderAssetUsages::default(),
    );

    commands.spawn((
        Mesh2d(meshes.add(mesh)),
        MeshMaterial2d(materials.add(Color::hsl(180.0, 0.95, 0.7))),
    ));
}
```
I was able to test on webgl2 and windows native and the issue seems to
be resolved. I am not familiar with how mesh rendering works and feel
like just skipping meshes should cause issues but I did not notice any.
2025-07-07 02:32:51 +00:00
andriyDev
2c6cf9a597
Run RenderStartup in/before extract instead of after it. (#19926)
# Objective

- Fixes #19910.

## Solution

- First, allow extraction function to be FnMut instead of Fn. FnMut is a
superset of Fn anyway, and we only ever call this function once at a
time (we would never call this in parallel for different pairs of worlds
or something).
- Run the `RenderStartup` schedule in the extract function with a flag
to only do it once.
- Remove all the `MainRender` stuff.

One sad part here is that now the `RenderStartup` blocks extraction. So
for pipelined rendering, our simulation will be blocked on the first
frame while we set up all the rendering resources. I don't see this as a
big loss though since A) that is fundamentally what we want here -
extraction **has to** run after `RenderStartup`, and the only way to do
better is to somehow run `RenderStartup` in parallel with the first
simulation frame, and B) without `RenderStartup` the **entire** app was
blocked on initializing render resources during Plugin construction - so
we're not really losing anything here.

## Testing

- I ran the `custom_post_processing` example (which was ported to use
`RenderStartup` in #19886) and it still works.
2025-07-07 01:31:40 +00:00
atlv
b6250439dd
remove fast_sqrt in favor of sqrt (#19995)
# Objective

- the fast inverse sqrt trick hasnt been useful on modern hardware for
over a decade now

## Solution

- just use sqrt, modern hardware has a dedicated instruction which will
outperform approximations both in efficiency and accuracy

## Testing

- ran `atmosphere`
2025-07-07 01:13:02 +00:00
atlv
537adcc3f7
bevy_light (#19991)
# Objective

- make lights usable without bevy_render

## Solution

- make a new crate for lights to live in

## Testing

- 3d_scene, lighting, volumetric_fog, ssr, transmission, pcss,
light_textures

Note: no breaking changes because of re-exports, except for light
textures, which were introduced this cycle so it doesn't matter anyways
2025-07-07 00:07:38 +00:00
atlv
a1139c23c6
fix percentage signs in SMAA (#19987)
# Objective

- fix typo
2025-07-06 22:24:26 +00:00
atlv
5b38989ac4
dont hard code clustering limits on cpu side so they can be informed by Limits later (#19985)
# Objective

- prepare bevy_light for split
- make limits more dynamically configurable

## Solution

- use settings struct

## Testing

- 3d_scene, lighting
2025-07-06 19:36:58 +00:00
atlv
baa88b98a3
fix variable-termination loop gradients by sampling specific lod (#19988)
# Objective

- Calculating gradients in variable-termination loop is bad, and we dont
need to here

## Solution

- Sample mip 0 always

## Testing

- volumetric_fog example
2025-07-06 19:13:10 +00:00
atlv
1579256709
Rename light visibility class (#19986)
# Objective

- prepare bevy_light for split
- make struct named better
- put it where it belongs

## Solution

- do those things

## Testing

- 3d_scene, lighting

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-06 19:04:30 +00:00
Giacomo Stevanato
8e89511e47
Remove Bundle::register_required_components (#19967)
# Objective

- `Bundle::register_required_components` is not used anywhere, let's
remove it
2025-07-06 18:15:28 +00:00
atlv
b5cefe2b5d
extract cluster extract to a separate module (#19973)
# Objective

- prepare bevy_light for split

## Solution

- split render world extract related cluster code from main world ecs
stuff

re-exports make this not breaking
2025-07-06 17:19:36 +00:00
atlv
c5fe7f0975
consistently dont use smallvec default features (#19972)
# Objective

- for smallvec some crates specify default features false, other dont.
turns out we dont need them

## Solution

- remove

## Testing

- 3d_scene
2025-07-06 04:25:26 +00:00
atlv
dd57db44d9
prepare bevy_light for split (#19965)
# Objective

- prepare bevy_light for split

## Solution

- extract cascade module (this is not strictly necessary for bevy_light)
- clean up imports to be less globby and tangled
- move light specific stuff into light modules
- move light system and type init from pbr into new LightPlugin

## Testing

- 3d_scene, lighting

NOTE TO REVIEWERS: it may help to review commits independently.
2025-07-06 04:11:46 +00:00
atlv
0b771d9f59
move ClusteredDecal to cluster module (#19959)
# Objective

- Make bevy_light possible by making it possible to split out
clusterable into bevy_camera

## Solution

- move ClusteredDecal to cluster module
- Depends on #19957 (because of the imports shuffling around) (draft
until thats merged)

## Testing

- 3d_scene runs

Note: no breaking changes thanks to re-exports
2025-07-05 19:31:59 +00:00
atlv
7aaf4bbd94
fix a couple typos in CubemapLayout (#19964)
# Objective

- Rob pointed out a couple typos in #19960 (i just did a copy paste, but
the original had an issue)

## Solution

- Fix
2025-07-05 17:05:56 +00:00
atlv
6ab8e0d9c7
move ShadowsEnabled to material (#19963)
# Objective

- Make bevy_light possible

## Solution

- Move non-light stuff out of light module (its a marker for whether a
material should cast shadows: thats a material property not a light
property)

## Testing

- 3d_scene runs
2025-07-05 17:05:14 +00:00
atlv
ced36021d0
move light stuff out of decal cluster (#19962)
# Objective

- Make bevy_light possible

## Solution

- Move light stuff into light module

## Testing

- 3d_scene runs

Note: no breaking changes thanks to re-exports
2025-07-05 17:04:21 +00:00
atlv
47e99c8285
move Cubemap stuff alongside CubemapFrusta in bevy_camera::primitives (#19955)
# Objective

- Make bevy_light possible

## Solution

- Move some stuff it needs out of somewhere it cant depend on. Plus it
makes sense, cubemap stuff goes next to cubemap stuff.

## Testing

- 3d_scene runs

Note: no breaking changes thanks to re-exports
2025-07-05 14:40:59 +00:00
atlv
59e8702a65
move calculate_cluster_factors to cluster assign (#19958)
# Objective

- Make bevy_light possible by making it possible to split out
clusterable into bevy_camera

## Solution

- Move some stuff so i can split it out cleanly.

## Testing

- 3d_scene runs
2025-07-05 14:40:33 +00:00
atlv
f987920bbd
Move CubemapLayout out of decal code (#19960)
# Objective

- Make bevy_light possible by making it possible to split out
clusterable into bevy_camera

## Solution

- Move cubemap stuff next to cubemap stuff.

## Testing

- 3d_scene runs

Note: no breaking changes thanks to re-exports
2025-07-05 14:40:28 +00:00
theotherphil
a869383cda
Minor code readability improvement in enum_utility.access_field (#19961)
Small cleanup copied from https://github.com/bevyengine/bevy/pull/16250
2025-07-05 14:40:23 +00:00
atlv
bdb39cf723
move spot light function into spot light file (#19956)
# Objective

- Make bevy_light possible

## Solution

- Move some stuff it needs out of somewhere it cant depend on. Plus it
makes sense, spotlight stuff goes in spotlight file.

## Testing

- 3d_scene runs

Note: no breaking changes thanks to re-exports
2025-07-05 14:40:06 +00:00
atlv
d0896bf10a
make cluster assign not depend on RenderAdapter/RenderDevice (#19957)
# Objective

- Make bevy_light possible by making it possible to split out
clusterable into bevy_camera

## Solution

- Use a resource to store cluster settings instead of recalculating it
every time from the render adapter/device

## Testing

- 3d_scene runs
2025-07-05 14:39:41 +00:00
atlv
1b09c4051e
Move Camera3d/2d to bevy_camera (#19953)
# Objective

- define scenes without bevy_render

## Solution

- Move Camera2d/3d components out of bevy_core_pipeline

## Testing

- 3d_scene runs fine

Note: no breaking changes thanks to re-exports
2025-07-05 13:24:28 +00:00
atlv
bfbc6c3d11
move some Visibility stuff to bevy_camera::visibility (#19954)
# Objective

- Make bevy_light possible

## Solution

- Move some stuff it needs out of somewhere it cant depend on. Plus it
makes sense, visibility stuff goes in visibility.

## Testing

- 3d_scene runs

Note: no breaking changes thanks to re-exports
2025-07-05 13:24:20 +00:00
andriyDev
29779e1e18
Use RenderStartup in bevy_ui. (#19901)
# Objective

- Progress towards #19887.

## Solution

- Convert `FromWorld` impls into systems that run in `RenderStartup`.
- Move `UiPipeline` init to `build_ui_render` instead of doing it
separately in `finish`.

Note: I am making several of these systems pub so that users could order
their systems relative to them. This is to match the fact that these
types previously were FromWorld so users could initialize them.

## Testing

- Ran `ui_material`, `ui_texture_slice`, `box_shadow`, and `gradients`
examples and it still worked.
2025-07-05 04:07:23 +00:00
atlv
bd5f924290
Split bevy_camera out of bevy_render (#19949)
# Objective

- get closer to being able to load gltfs without using bevy_render

## Solution

- Split bevy_camera out of bevy_render
- Builds on #19943
- Im sorry for the big diff, i tried to minimize it as much as i can by
using re-exports. This also prevents most breaking changes, but there
are still a couple.

## Testing

- 3d_scene looks good
2025-07-04 23:31:16 +00:00
Daniel Skates
560429ebd9
Observer trigger refactor (#19935)
# Objective

- The usage of ComponentId is quite confusing: events are not
components. By newtyping this, we can prevent stupid mistakes, avoid
leaking internal details and make the code clearer for users and engine
devs reading it.
- Adopts https://github.com/bevyengine/bevy/pull/19755

---------

Co-authored-by: oscar-benderstone <oscarbenderstone@gmail.com>
Co-authored-by: Oscar Bender-Stone <88625129+oscar-benderstone@users.noreply.github.com>
2025-07-04 16:27:21 +00:00
atlv
1380a3b7f2
add must_use to register_component_hooks (#19945)
# Objective

- I accidentally left a `register_component_hooks` without actually
adding a hook and didnt notice

## Solution

- mark it must_use so it doesnt happen to other people (maybe this is
just skill issue on me though)
2025-07-04 16:24:46 +00:00
atlv
58feca9b32
refactor(mesh): move Mesh3d and Mesh2d into bevy_mesh (#19943)
# Objective

- another step towards splitting out bevy_camera, this is needed by
visibility systems

## Solution

- move mesh stuff into mesh place

## Testing

- 3d_scene looks fine

No migration needed because of the re-export, that can be another PR
after i split bevy_camera
2025-07-04 16:24:21 +00:00
ickshonpe
b01de70bdd
bevy_ui_render crate (#18703)
# Objective

Move Bevy UI's rendering into a dedicated crate.

Motivations:
* Allow the UI renderer to be used with other UI frameworks than
`bevy_ui`.
* Allow for using alternative renderers like Vello with `bevy_ui`.
* It's difficult for rendering contributors to make changes and
improvements to the UI renderer as it requires in-depth knowledge of the
UI implementation.

## Solution

Move the `render` and `ui_material` modules from `bevy_ui` into a new
crate `bevy_ui_render`.

## Testing

Important examples to check are `testbed_ui`, `testbed_full_ui`,
`ui_material`, `viewport_node` and `gradients`.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-03 23:36:35 +00:00
Nicholas Nethercote
2d02f629b3
bevy_reflect: Remove unnecessary allow(unused_mut). (#19930)
# Objective

The generated `GetTypeRegistration::get_type_registration` method has an
unnecessary `allow(unused_mut)` attribute. It used to be necessary
because it was possible for `registration` to not be modified, but now
there is always at least one modification.

## Solution

Remove the attribute.

## Testing

I checked the `cargo expand` output.
2025-07-03 22:27:58 +00:00