bevyengine / bevyengine/bevy

Transparent windows on wayland must be pre-multiplied after transfer-function encoding

Open
#19,797 1 comment 0 reactions 0 assignees View on GitHub
A-Windowing C-Bug O-Linux O-Vulkan S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.17

## What you did

Run the transparent_window example.

## What went wrong

There is fringing where the bevy logo is translucent.

## Additional information

Wayland assumes that pre-multiplication is performed after transfer-function encoding. There is no way to achieve this in Vulkan with built-in functionality, therefore I think the simplest solution to achieve this is as follows:

1. Keep everything else as is.
2. Immediately before presentation, run the following compute shader on the swapchain image:
1. Apply the sRGB EOTF
2. Unpremultiply
3. Apply the sRGB OETF
4. Premultiply

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.