bevyengine / bevyengine/bevy

Resizing 2D camera's viewport drops FPS and crashes (with HDR and bloom enabled)

Open
#16,182 3 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.14.2, 0.15.0-dev (rev [#4656698](https://github.com/bevyengine/bevy/commit/46566980a6d69d2bd91505b6acd49ababa4d98f7)), 0.15.0-rc.2

All of them are affected.

## Relevant system information
- Rust version: cargo 1.84.0-nightly (e75214ea4 2024-10-25)
- Happens on stable, too
- OS: Linux
- Display Server: Wayland (happens on X with i3wm, too)
- Compositor: Hyprland (sway-wm based)
- `AdapterInfo { name: "NVIDIA GeForce GTX 1080", vendor: 4318, device: 7040, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "560.35.03", backend: Vulkan }`

## What you did

Added a system which animates the viewport's size on a 2D camera which has HDR enabled and a Bloom component with intensity > 0 (BloomSettings component instead for 0.14.2).

## What went wrong

- Debug: FPS drop more and more each frame.
- Release: FPS do not drop each frame, instead only when the viewport's X size is large and Y size small.
- Debug and Release: bevy crashes when the viewport's (valid) dimensions are very long and thin. The error message is the following:
```
ERROR wgpu::backend::wgpu_core: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (4)' panicked at [REDACTED]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.20.1/src/backend/wgpu_core.rs:2996:5:
wgpu error: Validation Error

Caused by:
In Device::create_texture
note: label = `bloom_texture`
Dimension X value 35170 exceeds the limit of 32768
```

## Additional information

Click [here](https://github.com/bloopyboop/bevy_camera_bug) for a minimal repo that demonstrates the bug. There is also additional info and steps to reproduce in the README.

EDIT: Added details to "What went wrong" section.
EDIT2: Tested bevy versions 0.15.0-dev and 0.15.0-rc.2, too. Bug occurs there, too. Linked repo has branches for each bevy version for reproduction.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.