godotengine / godotengine/godot

Using SSR, MSAA and hint_screen_texture still makes metallic objects black

Open
#104,508 2 comments 1 reaction 0 assignees View on GitHub
bug topic:3d topic:rendering
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`:

![Image](https://github.com/user-attachments/assets/256e347b-2c58-4192-828c-d9375bd7488c)

Without `depth_test_disabled`:

![Image](https://github.com/user-attachments/assets/1b120912-d85b-4025-9ee9-95327bf558f9)

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`:

![Image](https://github.com/user-attachments/assets/78d6dfc8-36ca-4a17-9eb1-cf6caab14bc7)

Without `depth_test_disabled`:

![Image](https://github.com/user-attachments/assets/190a155c-e172-4240-8906-a6580d28330d)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.