From b99d0d778a0b1b54b0c0d3d6dbd8d74d371ba8f7 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 12 Aug 2024 12:04:16 -0700 Subject: [PATCH] Use transformed roughness instead of raw roughness to calculate roughness fade in SSR --- .../renderer_rd/shaders/effects/screen_space_reflection.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl b/servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl index d629f2738d9..b730b2c819a 100644 --- a/servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl +++ b/servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl @@ -237,7 +237,7 @@ void main() { // This is an ad-hoc term to fade out the SSR as roughness increases. Values used // are meant to match the visual appearance of a ReflectionProbe. - float roughness_fade = smoothstep(0.4, 0.7, 1.0 - normal_roughness.w); + float roughness_fade = smoothstep(0.4, 0.7, 1.0 - roughness); // Schlick term. float metallic = texelFetch(source_metallic, ssC << 1, 0).w;