diff --git a/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli b/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli index 699032efc9..af6d873b6e 100644 --- a/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli +++ b/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli @@ -102,7 +102,7 @@ float4 SSSSBlurCS( float4 colorM = ColorTexture[DTid.xy]; #if defined(HORIZONTAL) - colorM.rgb = Color::GammaToLinear(colorM.rgb); + colorM.rgb = Color::GammaToTrueLinear(colorM.rgb); #endif if (sssAmount == 0) diff --git a/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSSCS.hlsl b/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSSCS.hlsl index b594c22410..77eb88dd5b 100644 --- a/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSSCS.hlsl +++ b/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSSCS.hlsl @@ -38,7 +38,7 @@ cbuffer PerFrameSSS : register(b1) bool humanProfile = MaskTexture[DTid.xy].y == sssAmount; float4 color = SSSSBlurCS(DTid.xy, texCoord, float2(0.0, 1.0), sssAmount, humanProfile); - color.rgb = Color::LinearToGamma(color.rgb); + color.rgb = Color::TrueLinearToGamma(color.rgb); SSSRW[DTid.xy] = float4(color.rgb, 1.0); #endif diff --git a/package/Shaders/Common/Color.hlsli b/package/Shaders/Common/Color.hlsli index 12d2c7de21..723eb457be 100644 --- a/package/Shaders/Common/Color.hlsli +++ b/package/Shaders/Common/Color.hlsli @@ -46,12 +46,22 @@ namespace Color float3 GammaToLinear(float3 color) { - return pow(color, 1.6); + return pow(color, 1.8); } float3 LinearToGamma(float3 color) { - return pow(color, 1.0 / 1.6); + return pow(color, 1.0 / 1.8); + } + + float3 GammaToTrueLinear(float3 color) + { + return pow(color, 2.2); + } + + float3 TrueLinearToGamma(float3 color) + { + return pow(color, 1.0 / 2.2); } float3 Diffuse(float3 color) diff --git a/src/Features/ScreenSpaceGI.cpp b/src/Features/ScreenSpaceGI.cpp index 52ca76e388..2a8fa808a7 100644 --- a/src/Features/ScreenSpaceGI.cpp +++ b/src/Features/ScreenSpaceGI.cpp @@ -171,14 +171,14 @@ void ScreenSpaceGI::DrawSettings() ImGui::Separator(); - ImGui::SliderFloat("AO radius", &settings.AORadius, 10.f, 800.0f, "%.1f game units"); + ImGui::SliderFloat("AO radius", &settings.AORadius, 10.f, 1024.0f, "%.1f game units"); if (auto _tt = Util::HoverTooltipWrapper()) ImGui::Text("A smaller radius produces tighter AO."); { auto _ = Util::DisableGuard(!settings.EnableGI); - ImGui::SliderFloat("IL radius", &settings.GIRadius, 10.f, 800.0f, "%.1f game units"); + ImGui::SliderFloat("IL radius", &settings.GIRadius, 10.f, 1024.0f, "%.1f game units"); if (auto _tt = Util::HoverTooltipWrapper()) ImGui::Text("A larger radius produces wider IL."); } @@ -194,7 +194,7 @@ void ScreenSpaceGI::DrawSettings() if (showAdvanced) { ImGui::Separator(); - ImGui::SliderFloat("Thickness", &settings.Thickness, 0.f, 500.0f, "%.1f game units"); + ImGui::SliderFloat("Thickness", &settings.Thickness, 0.f, 128.0f, "%.1f game units"); if (auto _tt = Util::HoverTooltipWrapper()) ImGui::Text("How thick the occluders are. Only affects AO."); } diff --git a/src/Features/ScreenSpaceGI.h b/src/Features/ScreenSpaceGI.h index dc0a7cf7a0..e16fa546b9 100644 --- a/src/Features/ScreenSpaceGI.h +++ b/src/Features/ScreenSpaceGI.h @@ -51,25 +51,25 @@ struct ScreenSpaceGI : Feature int ResolutionMode = 1; // 0-full, 1-half, 2-quarter // visual float MinScreenRadius = 0.01f; - float AORadius = 256.f; - float GIRadius = 256.f; - float Thickness = 16.f; + float AORadius = 512.f; + float GIRadius = 512.f; + float Thickness = 32.f; float2 DepthFadeRange = { 4e4, 5e4 }; // gi - float GISaturation = 0.9f; + float GISaturation = 1.0f; bool EnableGIBounce = true; float GIBounceFade = 1.0f; float GIDistanceCompensation = 0.f; // mix - float AOPower = 1.0f; - float GIStrength = 1.5f; + float AOPower = 2.0f; + float GIStrength = 2.0f; // denoise bool EnableTemporalDenoiser = true; bool EnableBlur = true; float DepthDisocclusion = .1f; float NormalDisocclusion = .1f; - uint MaxAccumFrames = 16; - float BlurRadius = 2.f; + uint MaxAccumFrames = 30; + float BlurRadius = 5.f; float DistanceNormalisation = 2.f; } settings; diff --git a/src/Features/Skylighting.h b/src/Features/Skylighting.h index e30ec884c8..4ea09003c5 100644 --- a/src/Features/Skylighting.h +++ b/src/Features/Skylighting.h @@ -36,7 +36,7 @@ struct Skylighting : Feature float MaxZenith = 3.1415926f / 2.f; // 90 deg float MinDiffuseVisibility = 0.1f; float MinSpecularVisibility = 0.1f; - float SSGIAmbientDimmer = 1.0f; + float SSGIAmbientDimmer = 0.5f; } settings; struct SkylightingCB