godotengine / godotengine/godot

Alpha to coverage doesn't work in Compatibility Renderer

Open
#98,173 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Tested in Godot 4.3 Stable (arch linux)

### System information

Godot v4.3.stable unknown - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Thu Oct 10 19:03:24 UTC 2024 - X11 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 (nvidia; 560.35.03) - Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz (6 Threads)

### Issue description

When enabling the alpha anti-aliasing settings in a standard material or custom shader with MSAA enabled, no change shows when in the compatibility renderer, bumping up to the mobile renderer shows proper alpha anti-aliasing with alpha to coverage or alpha to coverage and 1

This is extremely unfortunate as the compatibility renderer is currently preferred for standalone XR use cases (inlcuding webXR) and heavy aliasing caused by alpha test materials is visually distracting and intrusive in VR.
Ideally the alpha to coverage could be properly supported in the compatibility renderer so that it could be used for these cases. Even better would be to make sure it works for WebXR as well (where performance targets are even tighter and the use of textured alpha planes is vital to making anything that will look good and perform at a decent level)

### Steps to reproduce

enable 4x MSAA for 2d and 3d in project settings
set to compatibility renderer
create multiple intersecting planes with a material with transparency as such
![image](https://github.com/user-attachments/assets/2b6caee0-1426-4678-bda1-6fb253985b9f)
set editor to half resolution to better see anti-aliasing effects
notice that there is heavy aliasing

switch to mobile renderer
notice aliasing is now solved properly through alpha to coverage

### Minimal reproduction project (MRP)

see above. If you are unable to reproduce I can trim down my project and include here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with 4x MSAA, the compatibility renderer, intersecting transparent planes, and the provided Godot 4.3 environment, then compare it with the mobile renderer. Trace the compatibility renderer's alpha-to-coverage and MSAA handling. Done means alpha anti-aliasing matches the mobile renderer for the reproduction case, including the WebXR use case if supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.