bevyengine / bevyengine/bevy

2d renderer does not respect `AlphaMode2d::Mask`

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

Description

## Bevy version and features
- Version: 0.18.1"
- Features: `default-features = false`, `2d`, `dynamic_linking`

## \[Optional\] Relevant system information

MacOS 26.3.1 - 2022 M2 Air

If your bug is rendering-related, copy the adapter info that appears when you run Bevy.

```Ron
AdapterInfo { name: "Apple M2", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
```

## What you did

Describe how you arrived at the problem. If you can, consider providing a code snippet or link.

## What went wrong

When returning the `alpha_mode` from a custom `Material2d` as `AlphaMode2d::Mask(0.5)`, the rendered mesh is fully opaque even when the expected output was a quad with an alpha masked circle.

## Additional information

Please see the attached reproduction:

[alpha_clipping_repro.zip](https://github.com/user-attachments/files/26349119/alpha_clipping_repro.zip)

The actual output of this is:

Image

The expected output is:

Image

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.