Skip to content

Migrate pcss example to use FeathersRadio#24974

Open
kfc35 wants to merge 6 commits into
bevyengine:mainfrom
kfc35:24112_helpers_widgets_rs_migration
Open

Migrate pcss example to use FeathersRadio#24974
kfc35 wants to merge 6 commits into
bevyengine:mainfrom
kfc35:24112_helpers_widgets_rs_migration

Conversation

@kfc35

@kfc35 kfc35 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Objective

  • Part of UI Migration Plan for Bevy Examples #24112 , Phase 4. Kick it off a tiny bit to make it easier for others to get involved. I figured it would be more strategic for me to break down the more complex work and leave some of the easier bits for later if people who want to get acquainted with Bevy dev.

Solution

  • Add some new helpers that will take over the prior option button logic. Reviewers should probably read radio.rs first.
  • Remove any need to listen to messages by just making adding the value as a component on the radio buttons. It will be used to set the value of relevant settings.
  • Note that pcss now uses bsn! to spawn the buttons only, so the example has a mix of regular spawns and spawn scenes.

Once this is merged, phase 4 is unblocked to use these new methods for converting the other examples mentioned.

Testing

  • cargo run --example pcss --features="experimental_pbr_pcss,bevy_feathers”

Showcase

Before and After

Before:
Screenshot 2026-07-13 at 1 47 38 AM

After:
https://github.com/user-attachments/assets/c8713ce4-b852-4fca-a62e-100f8c8ba16a

@kfc35 kfc35 requested a review from viridia July 13, 2026 05:56
@kfc35 kfc35 added C-Examples An addition or correction to our examples A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 13, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI Jul 13, 2026
@kfc35 kfc35 added the D-Straightforward Simple bug fixes and API improvements, docs, test and examples label Jul 13, 2026
@kfc35 kfc35 changed the title Move pcss example to use FeathersRadioButton Migrate pcss example to use FeathersRadioButton Jul 13, 2026
@kfc35 kfc35 changed the title Migrate pcss example to use FeathersRadioButton Migrate pcss example to use FeathersRadio Jul 13, 2026

@viridia viridia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!

@kristoff3r

Copy link
Copy Markdown
Contributor

I tried running the example but on this branch it consistently panics deep inside the renderer, which doesn't happen on main. I have no idea how your changes could cause this though.

$ cargo run --example pcss --features="experimental_pbr_pcss,bevy_feathers,debug"

2026-07-13T14:35:25.805292Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux (NixOS 26.05)", kernel: "6.18.37", cpu: "AMD Ryzen 7 5800X 8-Core Processor", core_count: "8", memory: "47.0 GiB" }
2026-07-13T14:35:25.912158Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 3070", vendor: 4318, device: 9352, device_type: DiscreteGpu, device_pci_bus_id: "0000:0a:00.0", driver: "NVIDIA", driver_info: "595.71.05", backend: Vulkan, subgroup_min_size: 32, subgroup_max_size: 32, transient_saves_memory: false }

[...]

thread 'main' (313907) panicked at crates/bevy_render/src/render_phase/mod.rs:308:9:
assertion `left == right` failed
  left: 2
 right: 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'Compute Task Pool (3)' (313921) panicked at crates/bevy_render/src/render_phase/mod.rs:308:9:
assertion `left == right` failed
  left: 2
 right: 1

thread 'Compute Task Pool (2)' (313920) panicked at crates/bevy_render/src/render_phase/mod.rs:308:9:
assertion `left == right` failed
  left: 2
 right: 1

thread 'main' (313907) panicked at crates/bevy_ecs/src/error/handler.rs:141:1:
Encountered an error in system `bevy_pbr::render::light::queue_shadows`: System panicked


thread 'Compute Task Pool (2)' (313920) panicked at crates/bevy_ecs/src/error/handler.rs:141:1:
Encountered an error in system `bevy_pbr::material::queue_material_meshes`: System panicked

Encountered a panic in system `bevy_pbr::render::light::queue_shadows
thread 'Compute Task Pool (3)' (313921) panicked at crates/bevy_ecs/src/error/handler.rs:141:1:
Encountered an error in system `bevy_pbr::prepass::queue_prepass_material_meshes`: System panicked

`!
Encountered a panic in system `bevy_pbr::material::queue_material_meshes`!
Encountered a panic in system `bevy_pbr::prepass::queue_prepass_material_meshes`!

thread 'Render thread' (313956) panicked at crates/bevy_ecs/src/error/handler.rs:141:1:
Encountered an error in system `bevy_render::run_render_schedule`: Exclusive system panicked

Encountered a panic in system `bevy_render::run_render_schedule`!

@kfc35

kfc35 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

I tried running the example but on this branch it consistently panics deep inside the renderer, which doesn't happen on main.

I encountered this last night and concluded that my changes are mostly unrelated to the panic. I can get the panic to happen on main when I switch the light type so I spun out #24973

However it did make me wonder a tiny bit why moving to feathers sometimes makes it panic by itself. I cant see obviously why the light type would change on initialization but ill see what I can figure out

@kfc35

kfc35 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

The panicking should be resolved by #24980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

3 participants