Commit Graph

2381 Commits

Author SHA1 Message Date
Jan Hohenheim
8654718523
Add comment 2025-07-13 01:01:47 +02:00
Jan Hohenheim
5fdfcf3bdb
Keep camera in positive Z 2025-07-13 00:58:58 +02:00
Jan Hohenheim
0aa57c22c1
Revert light change 2025-07-13 00:57:05 +02:00
Jan Hohenheim
485e9a42d3
Keep camera in positive Z 2025-07-13 00:56:28 +02:00
Jan Hohenheim
3e4fc8ba8d
Remove PI 2025-07-13 00:53:58 +02:00
Jan Hohenheim
ee03e99670
Port scene_viewer 2025-07-13 00:32:12 +02:00
Jan Hohenheim
94ec868b9e
Port testbed_3d 2025-07-13 00:27:05 +02:00
Jan Hohenheim
64416842a8
Remove outdated comment 2025-07-13 00:18:53 +02:00
Jan Hohenheim
3be67b5718
Port many_foxes 2025-07-13 00:06:39 +02:00
Jan Hohenheim
70860c0f73
Port loading_screen 2025-07-13 00:05:07 +02:00
Jan Hohenheim
c56805adb1
Port projection_zoom 2025-07-13 00:02:22 +02:00
Jan Hohenheim
450633c7b6
Port gltf_skinned_mesh 2025-07-12 22:41:56 +02:00
Jan Hohenheim
ebee14573d
Replace quat with looking_to 2025-07-12 22:40:19 +02:00
Jan Hohenheim
8b6e59e9c7
Port animation_masks 2025-07-12 22:37:38 +02:00
Jan Hohenheim
5729c6db19
Port animation_graph 2025-07-12 22:36:43 +02:00
Jan Hohenheim
dbc800f97a
Port animated_mesh_events 2025-07-12 22:35:45 +02:00
Jan Hohenheim
49bf41d6d6
Port animated_mesh_control 2025-07-12 22:32:32 +02:00
Jan Hohenheim
7149b6ec7d
Port animated_mesh 2025-07-12 22:31:26 +02:00
Jan Hohenheim
672ea003ac
Port volumetric_fog 2025-07-12 22:28:39 +02:00
Jan Hohenheim
64cf749f61
Port visibility_range 2025-07-12 21:08:50 +02:00
Jan Hohenheim
1e805fd579
Port update_gltf_scene 2025-07-12 21:06:34 +02:00
Jan Hohenheim
abe51854b6
Port tonemapping 2025-07-12 21:02:53 +02:00
Jan Hohenheim
c21b0e263c
Fix incorrect description 2025-07-12 21:01:09 +02:00
Jan Hohenheim
9ba65d7d0e
Fix incorrect description 2025-07-12 20:58:43 +02:00
Jan Hohenheim
6c4cec343a
Port solari 2025-07-12 20:56:01 +02:00
Jan Hohenheim
cb7c662de0
Port post_processing 2025-07-12 20:43:48 +02:00
Jan Hohenheim
f88701f24e
Try porting mixed_lighting.rs 2025-07-12 20:19:05 +02:00
Jan Hohenheim
2629aed73b
Port load_gltf 2025-07-12 03:27:16 +02:00
Jan Hohenheim
517d4ffa32
Port lightmaps 2025-07-12 03:25:41 +02:00
Jan Hohenheim
ebd0ad5012
Fix frame dependent rotation speed while I'm on it 2025-07-12 03:23:28 +02:00
Jan Hohenheim
a37456cc25
Port edit_material_on_gltf 2025-07-12 03:16:58 +02:00
Jan Hohenheim
38e6eb0a7d
Port depth_of_field 2025-07-12 03:12:22 +02:00
Jan Hohenheim
1c57fa2eaa
Port deferred_rendering 2025-07-12 02:59:12 +02:00
Jan Hohenheim
58ff9704d9
Port color_grading 2025-07-12 02:56:01 +02:00
Jan Hohenheim
12dda344d8
Port atmospheric_fog 2025-07-12 02:40:32 +02:00
Jan Hohenheim
f695bef4c7
Port atmosphere 2025-07-12 02:37:50 +02:00
Jan Hohenheim
0fc670fbd4
Port anti_aliasing 2025-07-12 02:34:35 +02:00
Jan Hohenheim
4c66c3c5f5
Port anisotropy 2025-07-12 02:30:49 +02:00
Tim
cb64a4aa8a
Refactor 3d_viewport_to_world example with let chains (#20071)
# Objective

Make use of let chains to reduce LoC where we previously used let else
to cut down on indentation. Best of both worlds.
2025-07-10 02:37:56 +00:00
Talin
f2d25355c3
SliderPrecision component (#20032)
This PR adds a `SliderPrecision` component that lets you control the
rounding when dragging a slider.

Part of #19236
2025-07-09 20:06:58 +00:00
JMS55
1a3b26d433
Use PluginGroup for SolariPlugins (#20044) 2025-07-09 18:31:39 +00:00
Daniel Skates
d45ae74286
Add frame_time graph to fps_overlay v2 (#19277)
# Objective

- Rebase of https://github.com/bevyengine/bevy/pull/12561 , note that
this is blocked on "up-streaming
[iyes_perf_ui](https://crates.io/crates/iyes_perf_ui)" , but that work
seems to also be stalled

> Frame time is often more important to know than FPS but because of the
temporal nature of it, just seeing a number is not enough. Seeing a
graph that shows the history makes it easier to reason about
performance.

## Solution

> This PR adds a bar graph of the frame time history.
> 
> Each bar is scaled based on the frame time where a bigger frame time
will give a taller and wider bar.
> 
> The color also scales with that frame time where red is at or bellow
the minimum target fps and green is at or above the target maximum frame
rate. Anything between those 2 values will be interpolated between green
and red based on the frame time.
> 
> The algorithm is highly inspired by this article:
https://asawicki.info/news_1758_an_idea_for_visualization_of_frame_times

## Testing

- Ran `cargo run --example fps_overlay --features="bevy_dev_tools"`

---------

Co-authored-by: IceSentry <c.giguere42@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-09 16:59:21 +00:00
Talin
aa87581cce
Change CoreWidgets plugin to plugin group. (#20036)
What it says on the tin. :)
2025-07-09 01:07:49 +00:00
andriyDev
09ccedd244
Clean up several miscellaneous uses of weak_handle. (#19408)
# Objective

- Related to #19024.

## Solution

- This is a mix of several ways to get rid of weak handles. The primary
strategy is putting strong asset handles in resources that the rendering
code clones into its pipelines (or whatever).
- This does not handle every remaining case, but we are slowly clearing
them out.

## Testing

- `anti_aliasing` example still works.
- `fog_volumes` example still works.
2025-07-08 06:45:40 +00:00
ickshonpe
5e3927ba48
UI gradients long hue paths fix (#20010)
# Objective

The false and true arguments for the select statement in `lerp_hue_long`
are misordered, resulting in it taking the wrong hue path:


![oklch-long-wrong-path](https://github.com/user-attachments/assets/68b733ab-be4b-4280-9346-4fdfccdb053a)

## Solution

Swap the arguments around.

Also fixed another case I found during testing. The hue was interpolated
even when it is undefined for one of the endpoints (for example in a
gradient from black to yellow). In those cases it shouldn't interpolate,
instead it should return the hue of the other end point.

## Testing

I added a `linear_gradient` module to the testbed `ui` example, run
with:
```
cargo run --example testbed_ui
```

In the linear gradients screen (press space to switch) it shows a column
of red to yellow linear gradients. The last gradient in the column uses
the OKLCH long path, which should look like this:


![okchlong-red-yellow](https://github.com/user-attachments/assets/23537ff4-f01a-4a03-8473-9df57b2bfaf1)

matching the same gradient in CSS:

https://jsfiddle.net/fevshkdy/14/

if the correct hue path is chosen.
2025-07-07 22:19:24 +00:00
AlephCubed
3aed85a88b
Rename send_event and similar methods to write_event (#20017)
Fixes: #18963
Follows up on: #17977
Adopts: #18966

In 0.16, `EventWriter::send` was renamed to `EventWriter::write`, but
many methods were missed (sorry about that). This completes that
refactor by renaming all `send` methods and internals.

| Old | New |

|-------------------------------------|--------------------------------------|
| `World::send_event` | `World::write_event` |
| `World::send_event_default` | `World::write_event_default` |
| `World::send_event_batch` | `World::write_event_batch` |
| `DeferredWorld::send_event` | `DeferredWorld::write_event` |
| `DeferredWorld::send_event_default` |
`DeferredWorld::write_event_default` |
| `DeferredWorld::send_event_batch` | `DeferredWorld::write_event_batch`
|
| `Commands::send_event` | `Commmands::write_event` |
| `Events::send` | `Events::write` |
| `Events::send_default` | `Events::write_default` |
| `Events::send_batch` | `Events::write_batch` |
| `RemovedComponentEvents::send` | `RemovedComponentEvents::write` |
| `command::send_event` | `commmand::write_event` |
| `SendBatchIds` | `WriteBatchIds` |

---------

Co-authored-by: shwwwa <shwwwa.dev@gmail.com>
2025-07-07 22:05:16 +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
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
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
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