Преглед на файлове

Merge pull request #95438 from clayjohn/SSR-roughness-fix

Use transformed roughness instead of raw roughness to calculate roughness fade in SSR
Rémi Verschelde преди 1 година
родител
ревизия
afbcd0810f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      servers/rendering/renderer_rd/shaders/effects/screen_space_reflection.glsl

+ 1 - 1
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;