bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Update post_processing example to not render UI with first pass camera

Open darthdeus opened this issue 3 years ago • 5 comments
trafficstars

Objective

Make sure the post processing example won't render UI twice.

Solution

Disable UI on the first pass camera with UiCameraConfig

darthdeus avatar Nov 04 '22 21:11 darthdeus

I have seen at least one other person get hit by the double-UI thing while trying to build off of this example.

I think a PR to disable UI for the other camera would be welcome.

rparrett avatar Nov 05 '22 01:11 rparrett

I have seen at least one other person get hit by the double-UI thing while trying to build off of this example.

I think a PR to disable UI for the other camera would be welcome.

Not sure if it makes sense to make a new PR for that, but just for simplicity I pushed the changes here since the original changes don't make sense anymore. The only change now is what you said, the disabling of the UI being rendered by the first camera.

darthdeus avatar Nov 05 '22 01:11 darthdeus

Just need to update the PR title and description if we're reusing this PR.

rparrett avatar Nov 05 '22 02:11 rparrett

Okay PR title and description updated.

darthdeus avatar Nov 05 '22 03:11 darthdeus

Is it possible to make it so that UI rendering is only enabled by default for when there's a single camera? When multiple cameras are added, it's disabled by default and you need to add UiCameraConfig { show_ui: true } to one of them? Also if there are UI elements to render and not a single UI-enabled camera, you get a warning? That would perhaps be less surprising, and people wouldn't stumble on it then.

coreh avatar Nov 05 '22 16:11 coreh

bors r+

cart avatar Nov 14 '22 22:11 cart