bevyengine / bevyengine/bevy

ClearColorConfig not honored with multiple cameras

Open
#25,608 1 comment 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug D-Modest S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version and features

0.20.0-dev (mainline)

## \[Optional\] Relevant system information

- MacOS 15.7.4

```ignore
AdapterInfo { name: "Apple M1 Pro", vendor: 0, device: 0, device_type: IntegratedGpu, device_pci_bus_id: "", driver: "", driver_info: "", backend: Metal, subgroup_min_size: 4, subgroup_max_size: 64, transient_saves_memory: Some(true), limit_bucket: None }
```
## What you did

Three Camera2ds sharing a window.

## What went wrong

Only the last one's ClearColorConfig honored and it clears the whole window instead of its own Viewport

## Additional information

Example reproduction:

[repro_camera_bug.rs.zip](https://github.com/user-attachments/files/31629449/repro_camera_bug.rs.zip)

Contributor guide

Open the contributing guide

Research direction

Start by running the attached repro_camera_bug.rs.zip with Bevy 0.20.0-dev and observe the three Camera2d instances sharing a window. Trace how ClearColorConfig is applied when multiple cameras use separate viewports. Done means each camera's clear color affects only its own viewport rather than the last camera clearing the whole window.

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
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.