bevyengine / bevyengine/bevy

Track Occluded from Winit and don't attempt to render

Open
#23,504 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering A-Windowing
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

In the [wgpu 29 update PR](https://github.com/bevyengine/bevy/pull/23277) we silenced [a log](https://github.com/bevyengine/bevy/pull/23277#discussion_r2978625948) when we see `wgpu::CurrentSurfaceTexture::Occluded`.

This information is also provided by winit [as an event](https://docs.rs/winit/0.30.12/winit/event/enum.WindowEvent.html#variant.Occluded), and we could potentially track that information to prevent even *attempting* to render.

It is unknown if this has any significant performance win, but should be benchmarked to check if attempted, as this is an optimization to the current functionality.

Contributor guide

Open the contributing guide

Research direction

Start by reading the wgpu 29 update PR and winit's WindowEvent::Occluded documentation, then trace where Bevy receives window events and attempts rendering. Compare rendering behavior before and after tracking occlusion, and benchmark the change to determine whether skipping attempts provides a significant performance benefit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.