#Screenshot in 0.15 does not capture the egui GUI

1 messages · Page 1 of 1 (latest)

solemn scaffold
#

Hi,

After migration to Bevy 0.15. The screenshot image does not contains the egui GUI anymore. In Bevy 0.14 the GUI was in the screenshot image.

I tried to change the system order, making sure the screenshot commands was sent after the UI was draw, and pretty much any system order I could think of. But without success.

Does anyone have idea on what I should try? Or is this a bug? Is this a bevy_egui bug or a Bevy bug?

shell monolith
#

The screenshot code was rewritten for 0.15; I suspect it's capturing something subtly different

#

Can you open a Bevy bug?

frozen gorge
#

can you control the schedule at which screenshot is run?

#

can it be that the screenshot system runs before bevy_egui?

solemn scaffold
#

@shell monolith Yes I can.

#

@frozen gorge Yes I can control the schedule. I tried by sending the command to spawn the screenshot entity after drawing the UI and after some systems internal to bevy_egui but without any luck (yet). Maybe I did not try the correct order, yet. I do not know really how to analize the code do decide after which system I should send the command to spawn the screenshot.

shell monolith
#

I don't think this is a timing issue

#

I think that we're capturing a different part of the rendering process

#

Are you trying to screenshot this for testing purposes BTW?

solemn scaffold
#

@Alice No, I ported my app to bevy 0.15 and now it behave differently. But I could make a quick application just to test this.

shell monolith
#

No no that's fine: I'm just curious about use cases for the screenshot functionality 🙂

#

Wearing my product manager hat

solemn scaffold
#

Thanks. I am taking any suggestion on what I should look for in the code, or try as a workaround.

shell monolith
#
GitHub

Objective

Fixes DX12 backend panics when window is resized #15077

Solution

Clears ViewTargetAttachments resource every frame before create_surfaces system instead, which was previously done afte...

GitHub

Objective
Rewrite screenshotting to be able to accept any RenderTarget.
Closes #12478
Solution
Previously, screenshotting relied on setting a variety of state on the requested window. When extracte...

distant sand
#

i’ll give this a look

solemn scaffold
#

Thanks. Do you want me to try with different git commit (before and after each merge) to find which pull request introduced the issue?

solemn copper
#

This is informed by bevy 0.14, but I had a similar problem where the UI was not being captured. It seemed the UI was only drawn to one camera. I could have it in the primary camera or the child camera that was rendered to texture that had the DefaultUICamera component. But not both.

As a workaround, to show the UI on both, I ended up rendering everything to the capture camera and then showing the captured texture in a (100%, 100%) Node in my regular camera. So yeah, not ideal.