1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-30 16:26:50 +00:00

Use transformed roughness instead of raw roughness to calculate roughness fade in SSR

(cherry picked from commit b99d0d778a)
This commit is contained in:
clayjohn
2024-08-12 12:04:16 -07:00
committed by Rémi Verschelde
parent 5676d398e0
commit c684d65c64

View File

@@ -237,7 +237,7 @@ void main() {
// This is an ad-hoc term to fade out the SSR as roughness increases. Values used // 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. // 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. // Schlick term.
float metallic = texelFetch(source_metallic, ssC << 1, 0).w; float metallic = texelFetch(source_metallic, ssC << 1, 0).w;