From aec4978ca986ec923fde74f0013d4bf48288f866 Mon Sep 17 00:00:00 2001 From: "C. S." <76898260+Pentalimbed@users.noreply.github.com> Date: Thu, 15 Aug 2024 02:37:27 +0100 Subject: [PATCH] fix: ssgi use perceptual roughness instead of linear (#418) --- features/Screen Space GI/Shaders/ScreenSpaceGI/gi.cs.hlsl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/features/Screen Space GI/Shaders/ScreenSpaceGI/gi.cs.hlsl b/features/Screen Space GI/Shaders/ScreenSpaceGI/gi.cs.hlsl index e2a16d8fc..b15359ea6 100644 --- a/features/Screen Space GI/Shaders/ScreenSpaceGI/gi.cs.hlsl +++ b/features/Screen Space GI/Shaders/ScreenSpaceGI/gi.cs.hlsl @@ -117,8 +117,7 @@ void CalculateGI( float3 bentNormal = viewspaceNormal; #ifdef GI_SPECULAR - const float roughness2 = max(0.04, saturate(1 - FULLRES_LOAD(srcNormalRoughness, dtid, uv * frameScale, samplerLinearClamp).z)); // can't handle low roughness - const float roughness = sqrt(roughness2); + const float roughness = max(0.2, saturate(1 - FULLRES_LOAD(srcNormalRoughness, dtid, uv * frameScale, samplerLinearClamp).z)); // can't handle low roughness #endif for (uint slice = 0; slice < NumSlices; slice++) {