summaryrefslogtreecommitdiffstats
path: root/servers
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2024-08-12 12:04:16 -0700
committerRémi Verschelde <rverschelde@gmail.com>2024-09-16 17:06:30 +0200
commitc684d65c64800f21ddaf89527aaf1a483ea25fc1 (patch)
tree7518be1279e7a3b7ec276b5d20d4f453af349aa4 /servers
parent5676d398e0d8f542deee5d9096cc7bc1f15bc162 (diff)
downloadredot-engine-c684d65c64800f21ddaf89527aaf1a483ea25fc1.tar.gz
Use transformed roughness instead of raw roughness to calculate roughness fade in SSR
(cherry picked from commit b99d0d778a0b1b54b0c0d3d6dbd8d74d371ba8f7)
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl2
1 files changed, 1 insertions, 1 deletions
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 d629f2738d..b730b2c819 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;