godotengine / godotengine/godot

Subtractive Blending doesn't work on Compatibility Renderer

Open
#99,549 3 comments 0 reactions 0 assignees View on GitHub
bug confirmed topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

I've tested various versions of Godot 4 going all the way back to when the Compatibility Renderer was first added. None of them have correctly rendered subtractive blending. It should be reproducible in any version of Godot 4 with the Compatibility Renderer.

### System information

Godot v4.4.dev5 - Windows 10.0.19045 - Multi-window, 3 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 32.0.15.6094) - AMD Ryzen 7 5800X 8-Core Processor (16 threads)

### Issue description

Subtractive Blended Materials show a solid color, instead of blending with whatever is drawn behind. This isn't an issue for Additive or Multiplicative Blended Materials.

In editor, it shows one of your editor theme colors:

![Image](https://github.com/user-attachments/assets/358d4c23-69fe-4ba5-ad3d-27f4528d5de3)

In game, it seems to show a solid gray:

![Image](https://github.com/user-attachments/assets/153812ae-943a-4d79-ac30-5d06b9956d88)

### Steps to reproduce

1. Create a project, set to Compatibility Renderer
2. Open a 3D Scene
3. Add a Camera3D
4. Add a MeshInstance3D, with a PlaneMesh rotated towards the Camera
5. Add a StandardMaterial3D to the MeshInstance3D, Shading Mode set to Unshaded, Blend Mode set to Subtract

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the listed Compatibility Renderer steps and compare subtractive behavior with additive and multiplicative blending. Trace the Compatibility Renderer path for StandardMaterial3D blend modes; done means subtractive materials blend with the content behind them in both the editor and a running game.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.