From bf606e8c98b817c73319532571a7e078c6b33e56 Mon Sep 17 00:00:00 2001 From: doodlum <15017472+doodlum@users.noreply.github.com> Date: Tue, 16 Sep 2025 01:21:38 +0100 Subject: [PATCH] chore(skylighting): minor tweaks --- package/Shaders/Water.hlsl | 20 -------------------- src/Features/Skylighting.h | 4 ++-- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/package/Shaders/Water.hlsl b/package/Shaders/Water.hlsl index affdd058d2..b60bd8fc46 100644 --- a/package/Shaders/Water.hlsl +++ b/package/Shaders/Water.hlsl @@ -918,26 +918,6 @@ DiffuseOutput GetWaterDiffuseColor(PS_INPUT input, float3 normal, float3 viewDir float3 refractionColor = RefractionTex.Sample(RefractionSampler, refractionUV).xyz; float3 refractionDiffuseColor = lerp(ShallowColor.xyz, DeepColor.xyz, distanceMul.y); - if (!(Permutation::PixelShaderDescriptor & Permutation::WaterFlags::Interior)) { -# if defined(SKYLIGHTING) - float3 skylightingPosition = lerp(input.WPosition.xyz, refractionWorldPosition.xyz, noise); - -# if defined(VR) - float3 positionMSSkylight = skylightingPosition + FrameBuffer::CameraPosAdjust[eyeIndex].xyz - FrameBuffer::CameraPosAdjust[0].xyz; -# else - float3 positionMSSkylight = skylightingPosition; -# endif - - sh2 skylightingSH = Skylighting::sampleNoBias(SharedData::skylightingSettings, Skylighting::SkylightingProbeArray, positionMSSkylight); - float skylightingDiffuse = SphericalHarmonics::FuncProductIntegral(skylightingSH, SphericalHarmonics::EvaluateCosineLobe(float3(0, 0, 1))) / Math::PI; - skylightingDiffuse = saturate(skylightingDiffuse); - skylightingDiffuse = lerp(1.0, skylightingDiffuse, Skylighting::getFadeOutFactor(input.WPosition.xyz)); - - float3 refractionDiffuseColorSkylight = Skylighting::mixDiffuse(SharedData::skylightingSettings, skylightingDiffuse); - refractionDiffuseColor = Color::LinearToGamma(Color::GammaToLinear(refractionDiffuseColor) * refractionDiffuseColorSkylight); -# endif - } - # if defined(UNDERWATER) float refractionMul = 0; # else diff --git a/src/Features/Skylighting.h b/src/Features/Skylighting.h index 6e7f3f2cb6..10b4b10364 100644 --- a/src/Features/Skylighting.h +++ b/src/Features/Skylighting.h @@ -45,8 +45,8 @@ struct Skylighting : Feature struct Settings { float MaxZenith = 3.1415926f / 2.f; // 90 deg - float MinDiffuseVisibility = 0.25f; - float MinSpecularVisibility = 0.25f; + float MinDiffuseVisibility = 0.1f; + float MinSpecularVisibility = 0.1f; } settings; struct SkylightingCB