-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Several examples appear broken following recent changes #15570
Comments
I think deferred_rendering is broken too
|
@ChristopherBiscardi Agreed: #15525 |
Meshlet example/rendering is also broken :( |
3d in wasm/webgpu is also broken since #13497
it's also broken in wasm/webgl2 for another reason:
|
Which example is this? I tried a couple of the 3d examples but they all worked on wasm/webgl2 for me. |
examples |
Ah, I was testing in firefox. I didn't expect it to be browser-specific, fun. |
Both of those work for me with webgl2 on firefox and chromium on Linux. I hope it's not OSX specific =/ |
from https://docs.rs/wgpu/latest/wgpu/struct.Limits.html#method.downlevel_webgl2_defaults, I guess |
# Objective Fixes #15560 Fixes (most of) #15570 Currently a lot of examples (and presumably some user code) depend on toggling certain render features by adding/removing a single component to an entity, e.g. `SpotLight` to toggle a light. Because of the retained render world this no longer works: Extract will add any new components, but when it is removed the entity persists unchanged in the render world. ## Solution Add `SyncComponentPlugin<C: Component>` that registers `SyncToRenderWorld` as a required component for `C`, and adds a component hook that will clear all components from the render world entity when `C` is removed. We add this plugin to `ExtractComponentPlugin` which fixes most instances of the problem. For custom extraction logic we can manually add `SyncComponentPlugin` for that component. We also rename `WorldSyncPlugin` to `SyncWorldPlugin` so we start a naming convention like all the `Extract` plugins. In this PR I also fixed a bunch of breakage related to the retained render world, stemming from old code that assumed that `Entity` would be the same in both worlds. I found that using the `RenderEntity` wrapper instead of `Entity` in data structures when referring to render world entities makes intent much clearer, so I propose we make this an official pattern. ## Testing Run examples like ``` cargo run --features pbr_multi_layer_material_textures --example clearcoat cargo run --example volumetric_fog ``` and see that they work, and that toggles work correctly. But really we should test every single example, as we might not even have caught all the breakage yet. --- ## Migration Guide The retained render world notes should be updated to explain this edge case and `SyncComponentPlugin` --------- Co-authored-by: Alice Cecile <[email protected]> Co-authored-by: Trashtalk217 <[email protected]>
|
Currently Edit: Uh, this does not work if some components in |
All of the examples in the original message work for me (I just checked them off in the message). I've tested all of the other examples mentioned and they either (1) work for me or (2) have a separate tracking issue. I'm closing this out. If you identify a case that is still broken, please open a new issue scoped to it. |
The example runs shows several example regressions, per @rparrett on Discord.
Retained rendering world #15320 or various required components changes are both plausible.
This is in addition to #15563.
The text was updated successfully, but these errors were encountered: