Skip to content
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

Conditional extraction to render world can cause desync #15871

Closed
4 of 13 tasks
akimakinai opened this issue Oct 12, 2024 · 1 comment · Fixed by #15948
Closed
4 of 13 tasks

Conditional extraction to render world can cause desync #15871

akimakinai opened this issue Oct 12, 2024 · 1 comment · Fixed by #15948
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Design This issue requires design work to think about how it would best be accomplished
Milestone

Comments

@akimakinai
Copy link
Contributor

akimakinai commented Oct 12, 2024

In retained render world, despawning the main world entity or removing its components (#15582) are the only way to remove already inserted components from render world.
Some extraction systems seem to rely on the previous behavior by extracting components conditionally, expecting render entities to be wiped out every frame.

Most of them looks like optimization. Unfortunate but won't cause visual desync probably.

@akimakinai akimakinai added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Oct 12, 2024
@alice-i-cecile alice-i-cecile added this to the 0.15 milestone Oct 12, 2024
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed S-Needs-Triage This issue needs to be labelled labels Oct 12, 2024
@rafalh
Copy link
Contributor

rafalh commented Oct 16, 2024

Related to #15822/#15946

github-merge-queue bot pushed a commit that referenced this issue Oct 19, 2024
# Objective

- Fixes #15871
(Camera is done in #15946)

## Solution

- Do the same as #15904 for other extraction systems
- Added missing `SyncComponentPlugin` for DOF, TAA, and SSAO
(According to the
[documentation](https://dev-docs.bevyengine.org/bevy/render/sync_component/struct.SyncComponentPlugin.html),
this plugin "needs to be added for manual extraction implementations."
We may need to check this is done.)

## Testing

Modified example locally to add toggles if not exist.
- [x] DOF - toggling DOF component and perspective in `depth_of_field`
example
- [x] TAA - toggling `Camera.is_active` and TAA component
- [x] clusters - not entirely sure, toggling `Camera.is_active` in
`many_lights` example (no crash/glitch even without this PR)
- [x] previous_view - toggling `Camera.is_active` in `skybox` (no
crash/glitch even without this PR)
- [x] lights - toggling `Visibility` of `DirectionalLight` in `lighting`
example
- [x] SSAO - toggling `Camera.is_active` and SSAO component in `ssao`
example
- [x] default UI camera view - toggling `Camera.is_active` (nop without
#15946 because UI defaults to some camera even if `DefaultCameraView` is
not there)
- [x] volumetric fog - toggling existence of volumetric light. Looks
like optimization, no change in behavior/visuals
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-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants