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

Cameras with RenderTarget::Image freeze when their Image is mutably accessed #6480

Open
uber5001 opened this issue Nov 5, 2022 · 5 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Comments

@uber5001
Copy link

uber5001 commented Nov 5, 2022

Bevy version

0.8.1 and main branch on commit ea4aeff

[Optional] Relevant system information

AdapterInfo { name: "NVIDIA GeForce RTX 3080 Ti", vendor: 4318, device: 8712, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "512.15", backend: Vulkan }

What you did

I modified the example post_processing.rs by adding this system:

fn break_all_render_textures_system(mut images: ResMut<Assets<Image>>) {
    for _ in images.iter_mut() {}
}

Accessing the images with images.get_mut will have the same effect.

What went wrong

I was expecting to see a spinning cube with chromatic aberration. Instead, I see a still cube with chromatic aberration. Bevy is only rendering the first frame and then freezing.

Expected:
Recording 2022-11-05 at 04 30 43

Actual:
Recording 2022-11-05 at 04 29 20

Additional information

On 0.8.1, when using this mutable access to resize the image, I needed to use a workaround from #5595 (which seems to be fixed on main right now).

It seems like a stale render texture is being used. If the Image is resized, the shown frozen image is still at the old size.

@uber5001 uber5001 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Nov 5, 2022
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Nov 5, 2022
@alice-i-cecile
Copy link
Member

Can you reproduce this on main? :)

@uber5001
Copy link
Author

uber5001 commented Nov 5, 2022

Yep, I can reproduce it on main, on commit 5ae9475

@alice-i-cecile
Copy link
Member

Thanks for checking :)

@FishHawk
Copy link

Same in 0.11.0.

@ostwilkens
Copy link
Contributor

Experiencing this in 0.13

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
Projects
None yet
Development

No branches or pull requests

4 participants