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

ClearColorConfig::None doesn't correctly disable clear behavior #11883

Closed
tychedelia opened this issue Feb 15, 2024 · 4 comments · Fixed by #11884
Closed

ClearColorConfig::None doesn't correctly disable clear behavior #11883

tychedelia opened this issue Feb 15, 2024 · 4 comments · Fixed by #11884
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Milestone

Comments

@tychedelia
Copy link
Contributor

tychedelia commented Feb 15, 2024

Bevy version

0.13 (main branch).

What you did

Configured a simple 3d scene with ClearColorConfig::None on the only camera.

What went wrong

The screen is cleared each frame, instead of persisting draws between updates.

Additional information

Likely stemming from changes in #10325.

0.12: image
0.13: image

@tychedelia tychedelia added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 15, 2024
@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 Feb 15, 2024
@alice-i-cecile
Copy link
Member

alice-i-cecile commented Feb 15, 2024

How severe is this, and can you work around it? Trying to assess if fixing this should block the release.

@rparrett
Copy link
Contributor

Simple repro: modify the render_to_texture to use ClearColorConfig::None. The "inner brown cube" should be all smeary, but it is not.

@tychedelia
Copy link
Contributor Author

@alice-i-cecile We're porting Nannou to Bevy (nannou-org/nannou#953), and this is pretty fundamental to supporting a Processing like "sketch" creative coding setup (i.e., where the user "sketches" on a canvas). We're just getting started and probably won't be 100% baked until closer 0.14, but we'd ideally like to be able to track a stable release during our development for previews rather than following main.

@alice-i-cecile alice-i-cecile added this to the 0.13 milestone Feb 15, 2024
@james-j-obrien
Copy link
Contributor

I make use of this for a similar feature to nannou. I don't believe there is a work around that doesn't come with some performance loss. The simplest I can think of is keeping last frame's texture around so you can bind it when rendering the next frame and sample it, but that is a non-trivial amount of code across both rust and wgsl and comes with a perf hit.

tychedelia added a commit to tychedelia/bevy that referenced this issue Feb 15, 2024
This represents when the user has configured `ClearColorConfig::None`
in their application. If the clear color is `None`, we will always
`Load` instead of attempting to clear the attachment on the first
call.

Fixes bevyengine#11883.
tychedelia added a commit to tychedelia/bevy that referenced this issue Feb 15, 2024
This represents when the user has configured `ClearColorConfig::None`
in their application. If the clear color is `None`, we will always
`Load` instead of attempting to clear the attachment on the first
call.

Fixes bevyengine#11883.
tychedelia added a commit to tychedelia/bevy that referenced this issue Feb 15, 2024
This represents when the user has configured `ClearColorConfig::None`
in their application. If the clear color is `None`, we will always
`Load` instead of attempting to clear the attachment on the first
call.

Fixes bevyengine#11883.
github-merge-queue bot pushed a commit that referenced this issue Feb 16, 2024
This represents when the user has configured `ClearColorConfig::None` in
their application. If the clear color is `None`, we will always `Load`
instead of attempting to clear the attachment on the first call.

Fixes #11883.
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

Successfully merging a pull request may close this issue.

4 participants