Skip to content

Migrate clearcoat example to Feathers#25062

Open
tevans-3 wants to merge 4 commits into
bevyengine:mainfrom
tevans-3:main
Open

Migrate clearcoat example to Feathers#25062
tevans-3 wants to merge 4 commits into
bevyengine:mainfrom
tevans-3:main

Conversation

@tevans-3

Copy link
Copy Markdown

Objective

Solution

  • The previous clearcoat example used keyboard controls: by pressing a space key, a viewer of the example could toggle between "directional" and "point" light. This PR replaces that setup with a UI control pane which provides a total of 5 UI controls. In addition to two separate buttons for directional and point lights, there are new slider controls for illuminance and intensity and a scalar input for rotation speed. I found it kind of fun to make the spheres spin really quickly.

Testing

  • I visually inspected and "end-user" tested the example several times. All behavior worked as I expected.
  • Q: Are there any parts that need more testing? A: I don't think so.
  • Reviewers can test these changes by running the following command from within bevy's root directory:
cargo run --example clearcoat ---features="pbr_multi_layer_material_textures" ---features="bevy_feathers"

Showcase

image

…e, adding 3 new controls: for illuminance, intensity, and rotation speed
@IceSentry

Copy link
Copy Markdown
Contributor

A few quick notes:

  • There's too many nested containers. You don't need a background behind the thing that looks like it can fold but also the controls seem to be nested in a container with a different color which also seem unnecessary
  • The light choice should use some kind of radio button that clearly indicates which is currently selected and doesn't let users select another one
  • I haven't used bsn that much yet but I'm pretty sure you should be able to extract some things to functions instead of having just one giant bsn with dozens of level of identation.

@tevans-3

Copy link
Copy Markdown
Author

@IceSentry

Thanks for the notes. I removed some containers, reduced the nesting, and extracted a bunch of the inlined logic into separate functions.

Here's what the pane looks like now:

image

@kfc35 kfc35 added C-Examples An addition or correction to our examples A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 19, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI Jul 19, 2026
@kfc35
kfc35 self-requested a review July 20, 2026 03:23
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 C-Usability A targeted quality-of-life change that makes Bevy easier to use 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