godotengine / godotengine/godot
Using SSR, MSAA and hint_screen_texture still makes metallic objects black
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in v4.4.stable.official [4c311cbee]
### System information
Godot v4.4.stable - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Thu, 13 Mar 2025 18:11:42 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - dedicated AMD Radeon RX 570 Series (RADV POLARIS10) - AMD Ryzen 5 2600 Six-Core Processor (12 threads)
### Issue description
***UPDATE:** see https://github.com/godotengine/godot/issues/104508#issuecomment-2746117034 for new issue description*
Old issue description
It seems like #89949 was either not completely fixed, or there was a partial regression between v4.3.beta2 and v4.4.stable. When using the `depth_test_disabled` hint with a post-processing shader, the metallic parts are still black.
With `depth_test_disabled`:

Without `depth_test_disabled`:

Why this matters
The reason `depth_test_disabled` matters is that otherwise, the post-process will be drawn behind all objects. Here, I set albedo to `vec3(1.0)`.
With `depth_test_disabled`:

Without `depth_test_disabled`:

### Steps to reproduce
1. Open MRP
2. Launch project and toggle on MSAA, SSR and Post Process
The following is for the old MRP:
3. Open the shader at `PostProcess/post_process.gdshader` and uncomment `depth_test_disabled,` on the second line
4. Launch project and toggle on MSAA, SSR and Post Process
### Minimal reproduction project (MRP)
Old MRP: [msaascreentextureerror_2025-03-23_12-32-25.zip](https://github.com/user-attachments/files/19408099/msaascreentextureerror_2025-03-23_12-32-25.zip)
New MRP: https://github.com/godotengine/godot/issues/104508#issuecomment-2746119258
_Based on [BattyBovine's original MRP](https://github.com/BattyBovine/msaa-screentexture-error), MIT license_
Contributor guide
Research direction
Start by running the linked minimal reproduction project and follow the listed steps with MSAA, SSR, and post-processing enabled. Inspect PostProcess/post_process.gdshader, including the depth_test_disabled hint, and compare the metallic rendering against the reproduction screenshots. Done means the affected metallic objects no longer render black under the reported settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100