godotengine / godotengine/godot
Subtractive Blending doesn't work on Compatibility Renderer
- 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:

In game, it seems to show a solid gray:

### 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
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