Closed BraqueDown closed 2 years ago
I can confirm this on 4.0.alpha 126e4d0a5 (Linux, NVIDIA 510.68.02). This issue does not occur with SDFGI – its reflection remains visible on non-metallic materials.
I remember being able to see SSR on non-metallic materials a few months ago, but I may be wrong.
An equalized crop of the image at metallic = 0.0 reveals that there is indeed no visible screen-space reflection at all:
The SSR metallic blend is done here: https://github.com/godotengine/godot/blob/1847094271bda14c947bf46cbc52a4ca1603fb69/servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl#L232-L234
Commenting out both lines fixes the issue. It causes a diagonal streak to appear through the sky, but I assume this is an underlying SSR issue that would otherwise occur (but is invisible as the sky is never metallic):
Also, commenting out both lines makes reflections on rough non-metallic materials too visible:
SSR opacity should probably be modulated by roughness instead of metallic. This change would fit well with https://github.com/godotengine/godot/pull/56804.
Godot version
v4.0.alpha.custom_build [e297ddf65]
System information
Windows 10, Vulkan Clustered, RTX 3070 (512.15)
Issue description
The opacity/strength of Screen Space Reflections is tied to the Metallic property of the material receiving them. The effect gets stronger the more metallic the surface is, and dissapears completely at
0.0
.This means that SSR is totally non-functional on dielectric materials.
Video version:
https://user-images.githubusercontent.com/43602802/173183899-3cd00bab-2111-4b20-a6f6-fd2c86b0329e.mp4
Same scene in Blender with Eevee SSR for comparison:
https://user-images.githubusercontent.com/43602802/173183975-df64cc2a-4681-489b-9c1f-0a7520e08e77.mp4
Steps to reproduce
metallic
property on the initial mesh's material, and notice the reflections fading in and out.Minimal reproduction project
SSR Metal Bug.zip