bevyengine / bevyengine/bevy

Rendering issue at the boundary of the clear color

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

Description

## Bevy version
0.5.0

## Operating system & version
Arch Linux (5.12.9-arch1-1) running on a Toshiba laptop with Intel UHD Graphics 620 graphics.

## What you did
Created a simple scene with a couple of meshes representing a floor and two boxes, although the problem was also recreated by just running the examples from bevy-inspector-egui.

## What you expected to happen
The shadows from the egui widgets should blend nicely with the clear color set by `AppBuilder`'s `insert_resource(ClearColor(...))`. Similarly, I suspect the meshes in my scene should not have this fine white outline where they transition from the mesh to the clear color.

## What actually happened
The shadows from the egui widgets and the outline of the meshes interact strangely with the clear color. When changing the clear color dynamically using the widgets in the bevy-inspector-egui `world` example, **it appears that the pixels in question are picking up the clear color but at a brightness several times higher than it should be**.

## Additional information
This problem is present either the X11 or Wayland features enabled on the Bevy crate (see below) and is present with/without egui/egui_bevy included in the project.

Screenshot from Wayland
![wayland](https://user-images.githubusercontent.com/3796345/122921856-4e12a580-d363-11eb-8c15-e23fafdefbe3.png)

Screenshot from X11
![x11](https://user-images.githubusercontent.com/3796345/122921907-5cf95800-d363-11eb-9366-99e4e1232253.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the simple mesh scene and the bevy-inspector-egui examples, testing both X11 and Wayland and with egui excluded. Investigate how clear colors interact with rendered mesh edges and widget shadows. Done means the shadows blend with the configured clear color and mesh outlines no longer show the bright transition.

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
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.