bevyengine / bevyengine/bevy

Unpredictable start of rendering

Open
#21,600 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering A-Windowing C-Bug S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

When a Bevy (0.17.2) application is launched, it does not start rendering correctly right away. The first few frames are always completely transparent (zeroed alpha channel) and on subsequent frames, it seems to be very hard to predict, if Bevy has actually started writing data to the GPU buffers. This is a problem when using Bevy as a rendering tool for animations, because ideally, you'd want to start the animation immediately upon application launch.

In previous versions of Bevy (<=0.16), this problem already existed for [certain features](https://github.com/bevyengine/bevy/issues/6747), but in most cases, it could be alleviated by disabling the asynchronous compilation of the rendering pipeline within the `RenderPlugin` struct. But since the release of 0.17, this does not seem to work anymore, as the initial frame now consistently displays as transparent regardless of the `synchronous_pipeline_compilation` setting (tested on MacOS and Linux).

This bug can be reproduced by running the examples in https://github.com/paulkre/bevy_image_export/tree/v0.15.0 and looking at the exported images within the `./out` directory.

Contributor guide

Open the contributing guide

Research direction

Run the examples from paulkre/bevy_image_export at tag v0.15.0 and inspect the exported images in ./out to reproduce the transparent initial frames. Read the issue’s comparison with earlier Bevy versions and its notes about RenderPlugin.synchronous_pipeline_compilation; done means rendering starts reliably at launch rather than producing transparent initial frames.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.