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

[Merged by Bors] - bevy_pbr: Clear fog DynamicUniformBuffer before populating each frame #7432

Closed

Conversation

superdump
Copy link
Contributor

Objective

  • Fix a bug causing performance to drop over time because the GPU fog buffer was endlessly growing

Solution

  • Clear the fog buffer every frame before populating it

@superdump superdump added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times labels Jan 30, 2023
@superdump superdump requested a review from robtfm January 30, 2023 22:46
@Elabajaba
Copy link
Contributor

This was also a pretty noticeable memory leak (~80MB -> over 1GB after a few minutes).

This fixes it on my machine!

@superdump
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Jan 30, 2023
…#7432)

# Objective

- Fix a bug causing performance to drop over time because the GPU fog buffer was endlessly growing

## Solution

- Clear the fog buffer every frame before populating it
@bors bors bot changed the title bevy_pbr: Clear fog DynamicUniformBuffer before populating each frame [Merged by Bors] - bevy_pbr: Clear fog DynamicUniformBuffer before populating each frame Jan 30, 2023
@bors bors bot closed this Jan 30, 2023
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
…bevyengine#7432)

# Objective

- Fix a bug causing performance to drop over time because the GPU fog buffer was endlessly growing

## Solution

- Clear the fog buffer every frame before populating it
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 C-Performance A change motivated by improving speed, memory usage or compile times
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants