Commit Graph

11685 Commits

Author SHA1 Message Date
dependabot[bot] c6069b10d9 Bump actions/setup-java from 5.2.0 to 5.3.0
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/be666c2fcd27ec809703dec50e508c2fdc7f6654...ad2b38190b15e4d6bdf0c97fb4fca8412226d287)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-26 06:53:04 +00:00
JMS55 cbfaae46da Apply temporal jitter to PreviousViewData (#24672)
# Objective

- PreviousViewData did not account for temporal jitter, which led to
small inaccuracies that caused issues in a future solari PR.

## Solution

- Apply temporal jitter to PreviousViewData.
- Add unjittered_clip_from_world for motion vector usage which requires
unjittered matrices.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-26 02:23:14 +00:00
MAN$I VERMA 6628c6ebc1 Rename NextState::set_if_neq to set_if_different to resolve clashing (#24676)
Fixes #24655 by renaming NextState::set_if_neq to set_if_different to
resolve clashing.
2026-06-25 16:57:12 +00:00
HeartofPhos a8d1d0ac62 Fix bsn nested entity references (#24742)
fix nested named entities

# Objective

Fix nested entity references

## Solution

Iterate over entity references instead of only insert first

## Testing

Added relevent test case

---------

Co-authored-by: Heart <>
2026-06-25 16:56:54 +00:00
Gagnus 434f3e9430 Support floating dialogs in feathers and underlying bevy_ui_widgets. (#24705)
# Objective

- Many editor requirements require floating dialogs which can be
re-ordered and moved around, this would be useful for example for a
settings window or entity debugger.

## Solution

- I took the existing modal dialog as a starting point and expanded it
at the feathers level AND at the underlying bevy_ui_widgets level. The
naming was a bit of a clash but on advice I've got for no change to
existing stuff:
- At `bevy_ui_widgets` level there was `modal.rs` containing
`ModalDialog`, I've added `dialog.rs` containing `Dialog` and also moved
`RequestClose` from modal to dialog.
- At `bevy_feathers` level there was `dialog.rs` containing
`FeathersDialog` (a modal dialog), I've added new
`FeathersFloatingDialog` (a non-modal dialog)

## Testing

- Tested locally with a simple app

<img width="260" height="437" alt="image"
src="https://github.com/user-attachments/assets/0f5e098a-37c7-44e3-8b43-50dcd14bd50a"
/>

---------

Co-authored-by: John Payne <20407779+johngpayne@users.noreply.github.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-24 00:16:11 +00:00
Jasmine Lowen 🦁 cffef5b212 implement Clone for IsDefaultUiCamera (#24729)
I noticed that `IsDefaultUiCamera` is not allowed atm inside of the
`bsn!` macro.

```
    | |_____^ the trait `Clone` is not implemented for `bevy::prelude::IsDefaultUiCamera`
    |
    = help: the following other types implement trait `FromTemplate`:
              AnimationGraphHandle
              Atmosphere
              AudioPlayer<Source>
              CustomCursor
              CustomCursorImage
              DirectionalLightTexture
              DynamicWorldRoot
              EnvironmentMapLight
            and 34 others
    = note: required for `bevy::prelude::IsDefaultUiCamera` to implement `FromTemplate`
    = note: this error originates in the macro `bsn` (in Nightly builds, run with -Z macro-backtrace for more info)
```

This PR adds the `Clone` and `Copy` (it's a unit struct so it shouldn't
hurt) derives to the component.
2026-06-23 20:28:23 +00:00
Sigma-dev 6e93c2e468 fix: add missing png feature to bevy_feathers feature (#24727)
# Objective

If `bevy_feathers` is used without default features, then the built-in
feathers icons arn't displayed with no warnings.

## Solution

Add `png` feature flag to `bevy_feathers` since it has all it's widget
icons as pngs.

An alternate solution would be to add a warning instead somehow.

## Testing

Add a simple scene with `FeathersDisclosureToggle` (or any other icon
using widget) and test it with no default features (but still necessary
render features):

Pre-fix there will be nothing dispalyed but it will work fine post-fix.

(Example command for linux)
```
 cargo run --no-default-features  --features "bevy_winit,bevy_ui_render,scene,default_font,x11,bevy_state,bevy_asset,bevy_log,multi_threaded,async_executor,reflect_auto_register,bevy_feathers"
```
Fixes #24682

Co-authored-by: Sigma <antonin.programming@gmail.com>
2026-06-23 18:00:01 +00:00
Gagnus f4d3026694 Feathers theme aware fixes (#24719)
# Objective

- Developing a light theme I noticed a few bugs:
  - slider didn't recolor until mouse over
  - slider behind number input (when SoftLimit is used) had same issue
- icons, including dialog close never recolor, made them take text color
from theme
  - disclosure toggle recolored only when interacted with

## Solution

- Each had a slightly different fix. Disclosure toggle was setting
colors directly when enabled/disabled, instead re-inserted
InheritableThemeTextColor.
- NumberInput needed a plugin to add an update function
- Slider needed an update function
- icons I added a new ThemedIcon component marker and a system to color
that after text color has propagated (runs after propagation)

## Testing

- Tested all by switching theme in a local app. Should be zero change if
you are not changing theme as bugs only show up when doing so.

---------

Co-authored-by: John Payne <20407779+johngpayne@users.noreply.github.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-23 17:33:56 +00:00
Chris Hain d9d6f52ee2 Fix Visibility component having no effect on infinite grid (#24723)
# Objective

The custom render phase for infinite grid did not clear invisible or
despawned meshes before rendering, meaning the Visibility component had
no effect on the InfiniteGrid component when it was changed.

## Solution

Added a removal pass in the infinite_grid render queue.

## Testing

'toggle_visibilty' system added to the infinite_grid example.

Co-authored-by: Christopher Hain <8527064+chris-a-h@users.noreply.github.com>
2026-06-23 17:32:24 +00:00
Kristoffer Søholm 097fc03ce5 bevy_text: give swash a stable font id (#24710)
# Objective

Disclaimer: AI was used to find/triage the issue, but I spent quite a
bit of time verifying everything. I am not a text rendering exptert
though.

While investigating the performance regression fixed in
https://github.com/bevyengine/bevy/pull/24663 in my own project, I
stumbled upon another one related to caching and font hinting.

As mentioned in
https://docs.rs/swash/latest/swash/struct.FontRef.html#owning-your-fonts,
using the `FontRef` constructors implicitly generates new `CacheKey`
instances, which breaks the internal caching layer. Using the scale
builder without giving an id does this internally, which is a bit of a
footgun. I believe `cosmic_text` handled this before, and that this is a
regression from the move to `parley`.

When running `many_text2d --hinting` the startup time went from 7s to
500ms. I couldn't get a good tracy screenshot running with `--recompute`
because the fps on main is too low. Note that the measurements are based
on main before #24663.

<img width="745" height="324" alt="screenshot-2026-06-22-165610"
src="https://github.com/user-attachments/assets/62881ddb-84eb-4b20-b26e-8d305c3bb99a"
/>
<img width="634" height="527" alt="screenshot-2026-06-22-165624"
src="https://github.com/user-attachments/assets/96a38ef4-d51a-4c5e-a518-2596b212e1f6"
/>

## Solution

Give the builder a stable font id. Someone should confirm if this is
indeed a valid ID to give to swash, or if I forgot to take some
feature(s) into account.

I also added a `hinting` flag to `many_text2d` that I used for testing,
seems useful to keep.

## Testing

Ran `many_text2d`, saw better performance and that the text looked
similar.
2026-06-23 03:30:04 +00:00
Talin 09acb19786 Number input polish (#24701)
* Add migration guide
* Add release note
* Change background color when typing, disable hover and pressed states.

Part of #19236

---------

Co-authored-by: ickshonpe <david.curthoys@googlemail.com>
2026-06-23 00:31:49 +00:00
Dahmen Issam 0142070c36 Fix sorted batching without indirect drawing (#24708)
# Objective

Fix incorrect sorted batching when indirect drawing is unavailable.

While testing some glTF files on the web, I noticed transparent meshes
rendering with the wrong geometry or transforms: some objects appeared
duplicated or at incorrect positions. The same scenes rendered correctly
on native Windows.




Disabling automatic batching for `Transparent3d` avoided the issue by
setting `AUTOMATIC_BATCHING` to `false`, which pointed the investigation
toward batching.

After investigation, the issue came from the `NoIndirectDrawing` path
used when indirect drawing is unavailable. Different meshes could still
be grouped as if indirect multi-draw was supported.

## Solution

When `NoIndirectDrawing` is active, sorted phase items with different
meshes now start a new batch set instead of using `BreakBatch`.


## Testing

The original glTF asset that exposed the issue is confidential, but I
can share it privately with maintainers if needed.

I was able to reproduce the issue natively on Windows by adding
`NoIndirectDrawing`, which matches the path used on web when indirect
drawing is unavailable. Press Space to test the `NoIndirectDrawing`
path.

```
use bevy::{prelude::*, render::view::NoIndirectDrawing};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .insert_resource(ClearColor(Color::srgb(0.48, 0.48, 0.48)))
        .add_systems(Startup, setup)
        .add_systems(Update, toggle_no_indirect_drawing)
        .run();
}

fn setup(
    mut commands: Commands,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<StandardMaterial>>,
) {
    let meshes = [
        meshes.add(Cuboid::new(0.55, 0.55, 0.55)),
        meshes.add(Sphere::new(0.36).mesh().uv(32, 18)),
        meshes.add(Cylinder::new(0.32, 0.68).mesh().resolution(36)),
    ];
    let material = materials.add(StandardMaterial {
        base_color: Color::srgba(0.05, 0.75, 1.0, 0.48),
        alpha_mode: AlphaMode::Blend,
        ..default()
    });

    for (mesh, position) in [
        (0, Vec3::new(-1.0, -0.35, -1.8)),
        (1, Vec3::new(0.0, -0.25, -1.35)),
        (2, Vec3::new(1.0, -0.15, -0.9)),
        (0, Vec3::new(-1.0, 0.35, -0.45)),
        (1, Vec3::new(0.0, 0.45, 0.0)),
        (2, Vec3::new(1.0, 0.55, 0.45)),
    ] {
        commands.spawn((
            Mesh3d(meshes[mesh].clone()),
            MeshMaterial3d(material.clone()),
            Transform::from_translation(position),
        ));
    }

    commands.spawn((
        DirectionalLight::default(),
        Transform::from_xyz(4.0, 6.0, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
    ));

    let transform = Transform::from_xyz(0.0, 1.4, 4.4).looking_at(Vec3::ZERO, Vec3::Y);
    commands.spawn((Camera3d::default(), transform));
    commands.spawn((
        Camera3d::default(),
        Camera {
            is_active: false,
            ..default()
        },
        NoIndirectDrawing,
        transform,
    ));
}

fn toggle_no_indirect_drawing(
    keys: Res<ButtonInput<KeyCode>>,
    mut indirect: Single<&mut Camera, Without<NoIndirectDrawing>>,
    mut direct: Single<&mut Camera, With<NoIndirectDrawing>>,
) {
    if keys.just_pressed(KeyCode::Space) {
        let direct_enabled = indirect.is_active;
        indirect.is_active = !direct_enabled;
        direct.is_active = direct_enabled;
    }
}

```


https://github.com/user-attachments/assets/3f8f1dff-5702-430a-9ee0-f4ab24a5251b

---

## Showcase

Before this change, transparent glTF meshes on web could render with
duplicated geometry or wrong transforms when automatic batching was
enabled.


https://github.com/user-attachments/assets/c6516baa-5a56-4830-ba44-cca0dd5bf540

After this change, the same scenes render correctly:


https://github.com/user-attachments/assets/a8e2099c-f7fc-40d5-8240-ebcb5c42d367

Co-authored-by: Dahmen issam <issam.dahmen@fittingbox.com>
2026-06-22 22:41:34 +00:00
Ryan 0f2acc539e Update sysinfo dependency to version 0.39.5 (#24706)
# Solution

There was a build error on MacOS (M4 Max) for the `sysinfo` dependency.
Updating the dependency solves the problem.

## Relevant Issues

- https://github.com/bevyengine/bevy/issues/24698
- https://github.com/GuillaumeGomez/sysinfo/issues/1689

## Testing

- [x] Run `cargo build` on MacOS with an M4 chip
- [x] Verify that no build errors appear

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-22 21:14:18 +00:00
Kevin Chen 2442e918a1 Add missing import for light probe const ..._LIGHTMAPPED_MESH_DIFFUSE in irradiance_volume.wgsl (#24714)
# Objective

- Fix an issue someone reported in
[#rendering-dev](https://discord.com/channels/691052431525675048/743663924229963868/1518669667344846942)
-
https://github.com/bevyengine/bevy/blob/main/crates/bevy_pbr/src/light_probe/irradiance_volume.wgsl#L41-L47
currently breaks

## Solution

- Import the missing const

## Testing

- This is simple to verify by eye so I didn’t test this myself
- However, this just reminds me that there needs to be more automated
testing for rendering to discover such defects.
2026-06-22 20:45:05 +00:00
Gagnus 51dd88ee33 Feathers radio bg (#24704)
# Objective

- In order to support light themes the radio control (like the checkbox
and other controls) needs a bg color

## Solution

- This adds a background color for the radio control (*8 for each
scenario) and sets it in the default dark theme to none (ie
transparent), so there is no visual change.

## Testing

- Tested running the feathers_gallery example before and after and
tested locally as part of developing a light theme.

---------

Co-authored-by: John Payne <20407779+johngpayne@users.noreply.github.com>
2026-06-22 20:44:58 +00:00
Vic da4fb0da99 Allow entity wrappers in entity set and map types (#18408)
# Objective

Related to  #16547.

Currently we wrap `HashSet`/`HashMap`/`IndexSet`/`IndexMap` over the
`Entity` + `EntityHash` combination. This allows them to be used with
`EntitySet` functionality.
However, when `Entity` is newtyped, these wrappers can suddenly no
longer be used!
This causes types like `MainEntityHashSet`/`MainEntityHashMap` to fall
back to the `hashbrown/indexmap` versions again.

## Solution

We allow keying our map and set wrappers with `K: TrustedEntityBorrow`
types, not just `Entity`.

This requires a new trait to be sound: `TrustedBuildHasher<H: Hash>:
BuildHasher`.
Because both a `BuildHasher` and the hashed `Hash` type could introduce
nondeterminism into the final hash, we have to guarantee that such
combinations produce valid results. Collisions are fine, set and map
types can deal with them, only nondeterministic hashes present an issue.

On account of our wrappers only using `EntityHash`, we need only bound
them on `EntityHash: TrustedBuilderHasher<T>`. Not all
`TrustedEntityBorrow` types make sense to be hashed with `EntityHash`
however, so the only `EntityHash: TrustedBuildHasher` implementations
for now are with `Entity`, entity newtypes, and the `EntityRef`-family.

Adding a generic in place of `Entity` presents an issue for `HashMap`
and `IndexMap`:
If we want to retain the main case of `HashMap<Entity, V>`, one would
think to make `Entity` the default for K.
But if we were to do that, we'd need to swap the positions for the `K`
and `V` generics, as defaulted type parameters need to trail.

Because map types with swapped `K` and `V` would be very misleading, we
abstain from generics, and use a type alias for the
`EntityHashMap`/`EntityIndexMap` case instead.
A type alias and the aliased type need to have separate names, we name
these new, broader versions `EntityEquivalent*` instead of just
`Entity*`.
To keep the names consistent, we do the same for the set versions.

The name `EntityEquivalent` is more accurate to the actual meaning of
the `TrustedEntityBorrow` trait, so it may be worth renaming it in
another PR alongside the currently not so used `EntityBorrow`.
(`EntityBorrow` could have a separate name, so we do not need a
`Trusted` prefix for `EntityEquivalent`)

While the additions/deletions seem quite ominous, what this PR does is
conceptually not that complex:
In `hash.rs`
- Add `TrustedBuildHasher` trait and its impls for
`Entity`/`EntityRef`-family
 In `hash_set.rs`/`hash_map.rs`/`index_set.rs`/`index_map.rs`:
 - Rename set/map type from `Entity*` to `EntityEquivalent*`
 - Make aliases with the old `Entity*` names
 - Replace `Entity` key with `K` generic
- Bound `K` on `TrustedEntityBorrow + Hash` plus whatever specific impls
require
- Add `where EntityHash: TrustedBuildHasher<K>` bounds to type
definitions and impl blocks
 In `sync_world.rs`:
 - Add `TrustedBuildHasher` impls with `MainEntity`/`RenderEntity`
- Make `MainEntityHashSet`/`Map` aliases of
`EntityEquivalentHashSet`/`Map` respectively.
 The rest:
 - Fix up some `HashMap::default` to `MainEntityHashMap::default`
 - Replace map/set imports
 - Adjust a mention of `hash_set::Iter`
 
It is painful to have wrapper types that take up this much space and
should really not be necessary, but on the other hand, it
clarifies/increases our justification to request the required changes
upstream (`hashbrown`, then `indexmap`)!

With future upstream changes, we'd ultimately only need to retain the
`TrustedBuildHasher` trait, some aliases and the added bounds in some
impls.
If we'd then like to keep the wrappers around, we still could as well,
but they could be made a lot lighter.

## Migration Guide

`MainEntityHashSet`/`MainEntityHashMap` are no longer aliases of the
`hashbrown` types, so some associated functions have to use the proper
names or aliases to be used in place of `HashMap`.
Example: `HashMap::default` -> `MainEntityHashMap::default`

Types associated with any of `EntityHashSet`, `EntityHashMap`,
`EntityIndexSet`, `EntityIndexMap` now have an additional `K` generic.
To maintain the previous meaning, use `Entity` for `K`.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-22 20:20:58 +00:00
Trashtalk217 3b7c9a2c2e Remove 0.19 deprecated code from bevy_ecs (#24687)
# Objective

With a new release comes a spring cleaning. I've removed all of the code
from the ecs that was deprecated in 0.19.

## Testing

I've done `grep -r "deprecated"` in `/bevy_ecs` and removed all
mentions. I ran `cargo build` and everything seems to be working.
2026-06-22 20:16:54 +00:00
Luo Zhihao f21e14c900 Add Okhsla and Okhsva to bevy_color::prelude (#24688)
# Objective

Add Okhsla and Okhsva to `bevy_color::prelude` like other color types

## Solution

Add them. And clean up some unnecessary `pub(crate)`

## Testing

CI
2026-06-22 20:16:50 +00:00
Lucas Franca c64ff7c3c5 Fix wrong border radius corners on diagnostics overlay (#24713)
# Objective

Closes #24712 

## Solution

Use `BorderRadius` on the correct corners

## Testing

Added overlay to `many_foxes`
2026-06-22 19:47:55 +00:00
Pete Michaud b4aae57062 Downgrade gpu_readback closed-channel log from warn to debug (#24707)
`map_async` callbacks in `map_buffers` fire during wgpu's shutdown
device-poll, after `GpuReadbacks` (which owns the channel receivers) has
already been dropped. The `try_send` fails with `Closed` — expected,
since the consumer is gone because the app is exiting. The same happens
when a `Readback` entity is intentionally despawned.

This produces two `WARN bevy_render::gpu_readback: Failed to send
readback result: ...` lines on every app exit for any app using
`Readback`. The warning is never actionable.

Downgrade to `debug!` so the message is still available for diagnosis
but doesn't pollute default log output.
2026-06-22 19:47:11 +00:00
Tyler Critchlow 470e549ed7 Add EnvironmentMapLight::with_intensity builder method (#24692)
closes #23911 
# Objective

- Add a way to set the intensity of an EnvironmentMapLight.

## Solution

- Create a builder-style `with_intensity` method so that you can set
intensity easily while constructing.

```rust
EnvironmentMapLight::hemispherical_gradient(assets, sky, horizon, ground)
    .with_intensity(250.0)
```

## Testing

- This is a small convenience method with no behavioral change to
existing code, so no new tests were added.
- CI
2026-06-22 19:40:51 +00:00
Luo Zhihao 4516a9f2e4 Fix NaN okhsl/okhsv values when lightness approximates 0 or 1 (#24691)
# Objective

Fixes the issues found in
https://github.com/bevyengine/bevy/pull/24678#issuecomment-4759388911
because `LinearRgba::new(1.0, 1.0, 0.9999996, 1.0)` converted to `Okhsla
{ hue: 104.03624, saturation: NaN, lightness: 1.0, alpha: 1.0 }` which
contains NaN.

This happens when `oklab_l` == 0 or 1 while `C` != 0, e.g. white minus
epsilon

## Solution

Early return okhsl/okhsv when oklab lightness approximates 0 or 1.

## Testing

Added more color tests.

With this fix the okhsl lightness slider looks correct:
<img width="1920" height="1006" alt="屏幕截图_20260621_135530"
src="https://github.com/user-attachments/assets/8a8723c4-13b9-4240-bfd2-c8d5cfc60717"
/>
2026-06-22 19:39:55 +00:00
ickshonpe 931b9d96b4 clip_check_recursive fix (#24684)
# Objective

`clip_check_recursive` stops at the first unclipped ancestor when it
should progress all the way to the root element unless the given point
is clipped.

Fixes #24680 

## Solution
Early return if the entity is a root. 
Then check if the point is clipped and if so return false. 
Otherwise recurse to next ancestor.

## Testing

```
cargo run --example feathers_gallery --features="bevy_feathers"
```

The scrolling list should no long block the `x` text input when scrolled
all the way down.
2026-06-22 19:34:37 +00:00
François Mockers 05781d934f clamp time delta by max_delta even when relative speed is greater than 1 (#24237)
# Objective

- Fixes #22335
- When the relative speed is greater than 1.0, delta is not limited by
max_delta. max_delta should be the maximum delta

https://github.com/bevyengine/bevy/blob/2002a188e0e106eacf56b854dfaff4eca8839584/crates/bevy_time/src/virt.rs#L102-L104

## Solution

- Limit delta by max_delta even with a high relative_speed

## Testing

- Added / updated tests

---------

Co-authored-by: Kevin Chen <chen.kevin.f@gmail.com>
2026-06-22 19:27:35 +00:00
JMS55 56b08cd326 Solari: Fix MIS not using consistent PDF measures (#24671)
# Objective

- MIS between emissive and NEE light samples use area measure for the
emissive sample PDF, but solid angle measure for the NEE sample PDF.

## Solution

- Consistently use solid angle PDFs for MIS
- Also move isinf to sampling.wgsl for consistency
2026-06-22 19:19:39 +00:00
JMS55 fa0d6101f5 Solari: Add DLSS-RR toggle to example (#24667)
# Objective
- Make it easier to switch between denoised and non-denoised mode in the
solari example for development purposes

## Solution

- Add a toggle
2026-06-22 19:07:18 +00:00
Mira ad07c62b3d Deduplicate access_iter test logic (#24653)
The tests for `QueryData::iter_access`/`has_access` perform the same
checks for many different queries. Factor out this logic so it's easier
to see which queries get tested.
2026-06-22 19:02:55 +00:00
Stuart Parmenter fc5fa4a71c Don't declare atomics in the read-only late mesh preprocessing buffer (#24650)
# Objective

- Most examples in Bevy w/ wgpu main break on DX12 because Naga now
(correctly) rejects atomicLoad when bound read only (by incorrectly
generating bad code... going to work on a naga fix to more cleanly
reject). See https://www.w3.org/TR/WGSL/#atomic-load that it is for
read_write.

## Solution

- Use non-atomic in the same spot for LATE_PHASE.

## Testing

- Change Bevy to use latest wgpu main, run most examples w/
WGPU_BACKEND="dx12"
2026-06-22 19:01:08 +00:00
Talin 4b0579b18d Add scrubbing / dragging to number_input widget. (#24636)
# Objective

Part of #19236 

This PR is a near-total rewrite of the feathers number input widget.
This version adds the ability to edit the value by dragging,
behaviorally similar to the widgets in Blender.

## Features

* Click to edit textually
* Drag to adjust
* Adaptive drag speed heuristic
* Conditional slider bar (only appears if soft limits are specified)
* Soft and hard limits (ref. [Blender
documentation](https://docs.blender.org/manual/en/latest/interface/controls/buttons/fields.html#number-fields))
* Precision and step options
* Cursor shape changing
* Support for different number formats: f32, f64, i32, i64

## Backwards compatibility

The method for programmatically updating the edited value has changed to
be more consistent with other widgets - instead of sending an event, you
now insert a `NumberInputValue` component with the new value.

## Testing

- extensive manual testing via a new example, `feathers_number_input`.

## Additional Information

Things left to do:

* Visible increment / decrement arrows (only for fields with no soft
limit)
* Support for unit conversions and units display (meters, centimeters,
degrees, etc.)
* The theme colors are not final; there's some debate about whether we
will need to implement multiple thematic variations of this widget in
order to maintain sufficient contrast against different backgrounds.
* Accessibility support needs work.
* The example has some placeholder labels that we supposed to mirror the
input value, but that has not been finished.
* Does not enable drag capturing in CursorOption because bevy_picking
doesn't work with captured pointers.

Note: because of the complexity of this widget, it does not use the
"slider" headless widget, and instead is based on the `EditableText`
component, with slider-like behaviors layered on top.

Also, this widget pretty much subsumes all of the functionality of the
feathers slider, making the latter unnecessary. The only advantage of
`FeathersSlider` is that, since it only supports `f32`, it has a simpler
API.

---------

Co-authored-by: ickshonpe <david.curthoys@googlemail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-21 21:18:58 +00:00
Cookie fa11904dd4 Extract sprite_material functions, bindings, and types to separate shader modules (#24629)
# Objective

Make it easier to make sprite shaders by extracting the functions,
bindings, and types from the `SpriteMesh`'s `sprite_material.wgsl`
shader to exported modules

## Solution

Move the `SpriteMaterial` type and flags from `sprite_material.wgsl` to
the `bevy_sprite::sprite_types` module

Move the sprite material bindings to the `bevy_sprite::sprite_bindings`
module

Move the uv flipping, tiling, transforming, and slicing logic along with
some utility functions to the `bevy_sprite::sprite_functions` module

## Testing

Ran the `sprite_*` examples using `SpriteMesh` and manually verified
that the shaders compiled and the behaviour matched
2026-06-21 19:47:42 +00:00
ickshonpe 5baf00085d Text performance regression fix (#24663)
# Objective

Text layout updates take much longer than in 0.18.

## Solution

`update_text_layout_info` was building a new Swash `Scaler` for every
run.

Instead, only build a new `Scaler` when it is needed to rasterize new
glyphs.

Also added a `clear` method to `FontAtlasSets`. This is used by the
`many_text` example with the `--clear-font-atlases` arg to bench glyph
rasterization.

## Testing

Includes a new text benchmark `many_text`:

```
cargo run --example many_text --release
```

On my computer on main it reports ~35fps, with this branch ~130fps.
2026-06-21 19:44:14 +00:00
JMS55 bde4e9d7c8 Solari: Misc BRDF changes (#24668)
# Description
- Prevent NaNs from weird layering issues related to LUT precision by
clamping the result of evaluate_brdf
- Add `EvaluateAndSampleBrdfResult.diffuse_selected` which will be used
in a future PR
2026-06-21 19:42:18 +00:00
JMS55 b257cc2d72 Solari: Make light tiles properly random (#24670)
# Objective

- Due to reusing the same constant in presample_light_tiles RNG as I
used in the frame_index RNG, the light tiles were not properly random.
Tile N+1 on frame X+1 would use the same pool of light as tile N on
frame X - it was just "scrolling" each frame.

## Solution

- Use a different constant to properly randomize the pool
2026-06-21 19:41:49 +00:00
github-actions[bot] 82404b61a9 Bump Version after Release (#24697)
Bump version after release
This PR has been auto-generated

Co-authored-by: Bevy Auto Releaser <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-21 17:21:34 +00:00
François Mockers 718a71198e Fix version bump ci (#24693)
# Objective

- Workflow fails because of a missing `\`:
https://github.com/bevyengine/bevy/actions/runs/27897567873/job/82551836353

## Solution

- Add it
- Also exclude bevy_city
2026-06-21 16:04:09 +00:00
ickshonpe ec0cc1d4f5 Remove radio button comment (#24685)
# Objective

Remove a comment about check mark construction amongst the radio button
components that must have been copied from the checkbox widget
implementation by mistake.
2026-06-21 08:34:55 +00:00
Jasmine Lowen 🦁 6645810a9f docs: fixup of run condition docs (or_else) (#24677)
It seems like the docs before this change were leftovers from the old
methods. They didn't really reflect the current state and suggested
using the deprecated methods.
2026-06-21 07:31:36 +00:00
ickshonpe 8ce450bd98 Another text measurement fix (#24669)
# Objective

Text is wrapped to fit inside the node's content box but the node is
sized as though the text isn't wrapped.

Fixes #24664

## Solution

Subtract the total of the horizontal padding and border insets.

## Testing

Added the replication from #24664 to `testbed_ui`'s `TextWrap` scene:
```
cargo run --example testbed_ui -- textwrap
```

<img width="500" alt="image"
src="https://github.com/user-attachments/assets/e37884d1-7ae6-4aab-b16f-c5af004f5556"
/>

---

The other examples, particularly `text_debug`, shouldn't demonstrate any
changes.

---------

Co-authored-by: Dimitrios Loukadakis <dloukadakis@users.noreply.github.com>
2026-06-21 07:30:04 +00:00
François Mockers 1804890903 bevy_scene: don't use std Result (#24666)
# Objective

- bevy_scene doesn't build in non std

```
error: used import from `std` instead of `core`
   --> crates/bevy_scene/src/scene.rs:245:10
    |
245 |     ) -> std::prelude::v1::Result<(), ResolveSceneError> {
    |          ^^^ help: consider importing the item from `core`: `core`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#std_instead_of_core
    = note: `-D clippy::std-instead-of-core` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::std_instead_of_core)]`

error: could not compile `bevy_scene` (lib) due to 1 previous error
```

- triggered on 0.19 CI:
https://github.com/bevyengine/bevy/actions/runs/27730550478/job/82036465625

## Solution

- don't use std `Result`

## Testing

- Built locally
2026-06-19 19:59:28 +00:00
codecnotsupported f01eff8b55 Fix PanCamera mouse button check (#24659)
# Objective

Fix PanCamera to check which that the correct mouse button is used, not
just any.
Change default pan mouse button to middle mouse button.

## Solution

Add check.

## Testing

- Did you test these changes? If so, how?
- Tested in local test environment, then like a cave man, copy & pasted
the changes into github's text editor of the fork.

---------

Co-authored-by: N/A <N/A>
2026-06-19 04:00:00 +00:00
Mira f2f858494d Clearer QueryAccessError & has_conflicts docs (#24651)
Fixes #24644
2026-06-17 19:25:03 +00:00
Uche Okwo 86176d177f give immutable access to SystemWithAccess::system (#24652)
This change adds a `SystemWithAccess::system` method to give back access
to the ScheduleSystem without exposing it to mutation.

# Objective

To prevent mutation, [this PR][thePR] made all fields of
`SystemWithAccess` private.

However, external crates (in my case, `bevy_mod_debugdump`) need access
to `&ScheduleSystem`, which the PR made impossible.

## Solution

Add `SystemWithAccess::system` to allow accessing the contained
`ScheduleSystem` immutably

## Testing

- Did you test these changes? If so, how?
No
- Are there any parts that need more testing?
No
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
N/A
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?'
N/A

[thePR]: https://github.com/bevyengine/bevy/pull/23443
2026-06-17 19:23:10 +00:00
Dan Aloni 7496e1b639 light: add SunDisk::MARS preset for Mars atmosphere (#24618)
In the atmosphere example we can change between Earth and Mars, but the
size of the sun does not change. This somewhat bothered me from an
astronomical accuarcy.

This commit introduces a new `SunDisk::MARS` constant to accurately
represent the sun’s apparent size when viewed from Mars. The
implementation updates the documentation and adds the corresponding
constant with an angular size of ~21 arcminutes (0.00615 radians).

Key modifications:

- Added `SunDisk::MARS` constant in `directional_light.rs`
- Updated documentation to reference the new Mars preset
- Modified `atmosphere` example to switch sun disk alongside atmosphere
presets

I tested this manually.

---------

Co-authored-by: Máté Homolya <mate.homolya@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-17 17:46:34 +00:00
Kevin Chen 27e106b938 Update variadics_please requirement from 1.1 to 2.0 (#24640)
# Objective

- Adopts #24304 

## Solution

- Upgrading caused some `large_enum_variant` warnings. I box’ed the
affected variants.
- From the original Dependabot PR:
 
Updates the requirements on
[variadics_please](https://github.com/bevyengine/variadics_please) to
permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bevyengine/variadics_please/blob/main/RELEASES.md">variadics_please's
changelog</a>.</em></p>
<blockquote>
<h2>Version 2.0.0</h2>
<ul>
<li>Switch from <code>syn</code> to <code>unsynn</code>
<ul>
<li><a
href="https://fasterthanli.me/articles/the-virtue-of-unsynn"><code>syn</code>
is known to be a major compile time bottleneck</a>. To improve the
situation for users of <code>variadics_please</code>, we switched to
<code>unsynn</code>, which is the alternative used by <a
href="https://fasterthanli.me/articles/introducing-facet-reflection-for-rust"><code>facet</code></a>.</li>
<li>The compile time speedup depends on your local setup and the
complexity of the macro invocation,
but on one test setup, the cold compilation time went from about 2.16
seconds to 0.56 seconds.</li>
<li>The code generated by <code>variadics_please</code> should be
identical to before.
Our Error messages may look a bit different now, but they should be just
as readable.
If you encounter any weird behavior or diagnostics, let us know.</li>
</ul>
</li>
<li>Use Rust 2024, which bumps the MSRV to <code>1.85.0</code></li>
</ul>
<h2>Version 1.1</h2>
<ul>
<li>added <code>all_tuples_enumerated</code>, which provides the index
of each item in the tuple</li>
</ul>
<h2>Version 1.0.0</h2>
<ul>
<li>initial release
<ul>
<li>code was taken directly from <code>bevy_utils 0.15-rc2</code>, under
a MIT + Apache dual license</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/bevyengine/variadics_please/commits">compare
view</a></li>
</ul>
</details>
<br /> 

I’m assuming the changelog doesn’t look concerning

## Testing

- ci

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-17 17:15:23 +00:00
MostlyMo c9787c9ecd Entitymut doc changes for #24596 (#24631)
# Objective

- Describe the objective or issue this PR addresses.
- Fixes #24596 

## Solution

- Describe the solution used to achieve the objective above.
- Changed get_components methods that use result instead of option to
return the correct type instead of None.
- Moved safety above example for get/into_components_mut 

## Testing

- Did you test these changes? If so, how? Yes, ran "cargo run -p ci --
doc" and tests came back ok
- Are there any parts that need more testing? Not that I'm aware of.
- How can other people (reviewers) test your changes? Is there anything
specific they need to know? Read the comments and check they are
correct. there shouldn't be a fn returning type result that returns None
on the fail.
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test? N/A

---
2026-06-17 17:14:04 +00:00
Luo Zhihao 0008fd94c8 Reuse heap allocations in prepare_mesh_bind_groups (#24643)
# Objective

Reuse `MeshBindGroups` heap allocations in `prepare_mesh_bind_groups`

## Solution

Reuse heap memory from previously existing `MeshBindGroups` resource.

Also the lightmaps bind groups should be keyed by metadata slab id
otherwise it should be a bug if using vertex compression + lightmap +
webgl2

## Testing

Examples still work
2026-06-17 17:13:45 +00:00
ickshonpe b15e3b3290 EditableText pointer propagation fix (#24632)
# Objective

When an input is in IME composition mode, `EditableText` nodes should
absorb pointer events, not propagate them.

## Solution

Set focus and disable press propagation in `on_pointer_press` for
`EditableText` before the IME and local position return gates.

Disable drag propagation in `on_pointer_drag` for `EditableText` before
the IME composition and local position return gates.

The focus change is probably unnecessary but seems more natural, and
shouldn't result in any changes to observable behaviour.
2026-06-17 15:08:37 +00:00
Christophe Dehais 09d739d67a Derive Copy and Clone for InfiniteGrid (#24633)
Derive `Clone` for `InfiniteGrid`so that `FromTemplate` can be
auto-derived on it, making it spawnable with BSN.

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2026-06-17 05:28:49 +00:00
Jeb Brooks ea06f80230 Optionally allow FeathersColorSwatch to partially display opaque value (#24639)
This adds properties to the `FeathersColorSwatch` SceneComponent to
allow specifying a percentage of the swatch to remain opaque. This is
useful for color-pickers and generally handling colors with alpha
channels.

The property value will default to 0% so no migration guide is needed.

# Objective

- Allow a single `FeathersColorSwatch` to display the selected color
with and without its alpha channel.

## Solution

- Adds `FeathersColorSwatchProps` to allow dedicating a percentage of
the swatch area to the opaque color value

## Testing

Updated the `feathers_gallery` example to display the `rgba` color
swatch with 30% dedicated to the opaque color.

---

## Showcase

<img width="1280" height="720" alt="Screenshot_2026-06-15_21-09-53"
src="https://github.com/user-attachments/assets/1b3405f5-973b-42fb-abd5-b08c39c59cb6"
/>
2026-06-17 05:18:25 +00:00
Uche Okwo 3d01901bb7 Add impl of (Try)StableInterpolate for arrays (#24641)
# Objective

Noticed that there was an implementation of StableInterpolate for
tuples, but not for any array types.

## Solution

- Added an implementation of StableInterpolate for static arrays
- Added an implementation of TryStableInterpolate for dynamic arrays
(gated on the `alloc` feature)

## Testing

- Did you test these changes? If so, how?
Created a new test module in common_traits
- Are there any parts that need more testing?
No
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
Try interpolating array types
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
N/A
2026-06-17 05:17:37 +00:00