Skip to content

🧪 Reduce dependency of mesh view on the resources that are bound to it #18743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

hukasu
Copy link
Contributor

@hukasu hukasu commented Apr 7, 2025

Objective

Reduce dependency of mesh view on the resources that are bound to it

Solution

Create a method for injecting view resources into the mesh view bind groups

Testing

Not enough

TODO

  • Allow reserving blocks at a time instead of individual bindings
  • Do the same treatment to bind group layout
  • Do the same treatment to bind group offsets
  • Move each of the bind group injections to the modules that they refer to
  • Release note
  • Investigate log spam
  • Make the binding for decals optional on macos

Copy link
Contributor

github-actions bot commented Apr 7, 2025

Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke!
You can review it at https://pixel-eagle.com/project/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D?filter=PR-18743

If it's expected, please add the M-Deliberate-Rendering-Change label.

If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it.

@hukasu
Copy link
Contributor Author

hukasu commented Apr 7, 2025

it shouldn't have changed rendering, but it might have caused compilation of the pipeline to take longer

ran cargo run --example testbed_3d --features="bevy_ci_testing" locally and the screenshots were fine

build_ssao_fallback_image.run_if(not(resource_exists::<
ScreenSpaceAmbientOcclusionFallbackImage,
>)),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made this like this because i couldn't get taking a SystemParam out of World to work, either can someone teach me how to do this or could we get Startup schedule on the render app?

@hukasu hukasu changed the title Simplify mesh view bind groups Reduce dependency of mesh view on the resources that are bound to it Apr 7, 2025
Copy link
Contributor

github-actions bot commented Apr 7, 2025

Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke!
You can review it at https://pixel-eagle.com/project/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D?filter=PR-18743

If it's expected, please add the M-Deliberate-Rendering-Change label.

If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it.

Copy link
Contributor

github-actions bot commented Apr 7, 2025

Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke!
You can review it at https://pixel-eagle.com/project/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D?filter=PR-18743

If it's expected, please add the M-Deliberate-Rendering-Change label.

If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it.

@mockersf
Copy link
Member

mockersf commented Apr 7, 2025

it shouldn't have changed rendering, but it might have caused compilation of the pipeline to take longer

You can check the CI logs for errors: https://github.com/bevyengine/bevy/actions/runs/14309384053/job/40100472837?pr=18743
there are many errors, among which

2025-04-07T12:42:04.916855Z ERROR system{name="bevy_pbr::render::mesh_view_bindings::prepare_mesh_view_bind_groups"}: bevy_pbr::render::mesh_view_bindings: 6v5: Binding group could not be built because could not fetch DecalTextureViews.

CI is running on macOS, and decals don't work on macOS.

@hukasu
Copy link
Contributor Author

hukasu commented Apr 7, 2025

CI is running on macOS, and decals don't work on macOS.

added a task on the post to remember that

Check if decals is available
Allow locking of `MeshViewBindGroupsSources`
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Apr 8, 2025
@hukasu hukasu changed the title Reduce dependency of mesh view on the resources that are bound to it 🧪 Reduce dependency of mesh view on the resources that are bound to it Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants