Commit Graph

9311 Commits

Author SHA1 Message Date
Jan Hohenheim
cad324cd04
Port irradiance_volumes 2025-07-13 02:45:00 +02:00
Jan Hohenheim
187859f41c
Keep camera in positive Z 2025-07-13 01:04:34 +02:00
Jan Hohenheim
f20c8afd3d
Keep camera in positive Z 2025-07-13 01:03:17 +02:00
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
a5f6d91b4b
Fix formatting 2025-07-13 00:48:25 +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
8b1ca93ba0
Merge branch 'main' into port-gltf-examples 2025-07-12 22:55:38 +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
Christian Hughes
f1eace62f0
Thoroughly document UninitializedId semantics (#20080)
# Objective

Clean up documentation around `UninitializedId`, which has slightly
confusing semantics.

## Solution

Added documentation comments on `UninitializedId`.

---------

Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
2025-07-12 03:56:23 +00: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
29d92bf9dd
Convert lights with the camera transform 2025-07-12 03:12:15 +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
Jan Hohenheim
c927f3cb31
Enable glTF coordinate conversion in examples 2025-07-12 02:26:49 +02:00
atlv
20dfae9a2d
Factor out up-choice in shadow cubemap sampling orthonormalize (#20052)
# Objective

- Another step towards unifying our orthonormal basis construction
#20050
- Preserve behavior but fix a bug. Unification will be a followup after
these two PRs and will need more thorough testing.

## Solution

- Make shadow cubemap sampling orthonormalize have the same function
signature as the other orthonormal basis functions in bevy

## Testing

- 3d_scene + lighting examples
2025-07-11 12:19:02 +00:00
atlv
b3032e06bd
Fix adapter forcing breaking wasm builds (#20054)
# Objective

- Appease @mockersf 

## Solution

- Gate out enumerate_adapters usage on wasm and warn if
`WGPU_FORCE_FALLBACK_ADAPTER` is somehow used.
2025-07-11 12:18:23 +00:00
atlv
cfb679a752
Add a release note for scene types refactor (#20051)
Its really barebones but I'm not sure what else to write.

---------

Co-authored-by: Robert Swain <robert.swain@gmail.com>
2025-07-11 07:34:06 +00:00
ickshonpe
df5dfcd298
OverrideClip interaction fix (#20064)
# Objective

Picking was changed in the UI transform PR to walk up the tree
recursively to check if an interaction was on a clipped node.
`OverrideClip` only affects a node's local clipping rect, so valid
interactions can be ignored if a node has clipped ancestors.

## Solution

Add a `Without<OverrideClip>` query filter to the picking systems'
`child_of_query`s.

## Testing

This modified `button` example can be used to test the change:
```rust
//! This example illustrates how to create a button that changes color and text based on its
//! interaction state.

use bevy::{color::palettes::basic::*, input_focus::InputFocus, prelude::*, winit::WinitSettings};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        // Only run the app when there is user input. This will significantly reduce CPU/GPU use.
        .insert_resource(WinitSettings::desktop_app())
        // `InputFocus` must be set for accessibility to recognize the button.
        .init_resource::<InputFocus>()
        .add_systems(Startup, setup)
        .add_systems(Update, button_system)
        .run();
}

const NORMAL_BUTTON: Color = Color::srgb(0.15, 0.15, 0.15);
const HOVERED_BUTTON: Color = Color::srgb(0.25, 0.25, 0.25);
const PRESSED_BUTTON: Color = Color::srgb(0.35, 0.75, 0.35);

fn button_system(
    mut input_focus: ResMut<InputFocus>,
    mut interaction_query: Query<
        (
            Entity,
            &Interaction,
            &mut BackgroundColor,
            &mut BorderColor,
            &mut Button,
            &Children,
        ),
        Changed<Interaction>,
    >,
    mut text_query: Query<&mut Text>,
) {
    for (entity, interaction, mut color, mut border_color, mut button, children) in
        &mut interaction_query
    {
        let mut text = text_query.get_mut(children[0]).unwrap();

        match *interaction {
            Interaction::Pressed => {
                input_focus.set(entity);
                **text = "Press".to_string();
                *color = PRESSED_BUTTON.into();
                *border_color = BorderColor::all(RED.into());

                // The accessibility system's only update the button's state when the `Button` component is marked as changed.
                button.set_changed();
            }
            Interaction::Hovered => {
                input_focus.set(entity);
                **text = "Hover".to_string();
                *color = HOVERED_BUTTON.into();
                *border_color = BorderColor::all(Color::WHITE);
                button.set_changed();
            }
            Interaction::None => {
                input_focus.clear();
                **text = "Button".to_string();
                *color = NORMAL_BUTTON.into();
                *border_color = BorderColor::all(Color::BLACK);
            }
        }
    }
}

fn setup(mut commands: Commands, assets: Res<AssetServer>) {
    // ui camera
    commands.spawn(Camera2d);
    commands.spawn(button(&assets));
}

fn button(asset_server: &AssetServer) -> impl Bundle + use<> {
    (
        Node {
            width: Val::Percent(100.0),
            height: Val::Percent(100.0),
            align_items: AlignItems::Center,
            justify_content: JustifyContent::Center,
            ..default()
        },
        children![(
            Node {
                width: Val::Px(0.),
                height: Val::Px(0.),
                overflow: Overflow::clip(),
                ..default()
            },
            children![(
                //OverrideClip,
                Button,
                Node {
                    position_type: PositionType::Absolute,
                    width: Val::Px(150.0),
                    height: Val::Px(65.0),
                    border: UiRect::all(Val::Px(5.0)),
                    // horizontally center child text
                    justify_content: JustifyContent::Center,
                    // vertically center child text
                    align_items: AlignItems::Center,
                    ..default()
                },
                BorderColor::all(Color::WHITE),
                BorderRadius::MAX,
                BackgroundColor(Color::BLACK),
                children![(
                    Text::new("Button"),
                    TextFont {
                        font: asset_server.load("fonts/FiraSans-Bold.ttf"),
                        font_size: 33.0,
                        ..default()
                    },
                    TextColor(Color::srgb(0.9, 0.9, 0.9)),
                    TextShadow::default(),
                )]
            )],
        )],
    )
}
```
On main the button ignores interactions, with this PR it should respond
correctly.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-07-11 05:02:36 +00:00