From 9200f369259f8b378e359fc40754415db3b04cda Mon Sep 17 00:00:00 2001 From: routersys Date: Tue, 20 Oct 2026 18:36:11 +0900 Subject: [PATCH] =?UTF-8?q?=E6=8F=8F=E7=94=BB=E3=82=B7=E3=82=A7=E3=83=BC?= =?UTF-8?q?=E3=83=80=E3=83=BC=E3=81=AE=E5=AE=9A=E6=95=B0=E3=81=AB=E5=90=8D?= =?UTF-8?q?=E5=89=8D=E3=82=92=E4=BB=98=E3=81=91=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inflate/InflateGpuShaders.cs | 4 ++-- Inflate/InflateSettings.cs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Inflate/InflateGpuShaders.cs b/Inflate/InflateGpuShaders.cs index 515fa29..2523882 100644 --- a/Inflate/InflateGpuShaders.cs +++ b/Inflate/InflateGpuShaders.cs @@ -752,7 +752,7 @@ internal readonly partial struct RenderShader( var highlight = Hlsl.Pow(Hlsl.Saturate(Hlsl.Dot(normal, halfVector)), specularExponent) * specular * (lightCosine > 0f ? 1f : 0f); var mirrorY = 2f * facing * normal.Y; - var skyAmount = Hlsl.SmoothStep(0.25f, 0.75f, 0.5f - 0.5f * mirrorY); + var skyAmount = Hlsl.SmoothStep(InflateSettings.SkyBlendStart, InflateSettings.SkyBlendEnd, 0.5f - 0.5f * mirrorY); var sky = new Float3(InflateSettings.SkyRed, InflateSettings.SkyGreen, InflateSettings.SkyBlue); var ground = new Float3(InflateSettings.GroundRed, InflateSettings.GroundGreen, InflateSettings.GroundBlue); var environment = Hlsl.Lerp(ground, sky, skyAmount); @@ -768,7 +768,7 @@ internal readonly partial struct RenderShader( var color = albedo * lit; color = Hlsl.Lerp(color, environment, reflectionAmount); color += new Float3(highlight, highlight, highlight); - color += Hlsl.Lerp(albedo, new Float3(1f, 1f, 1f), 0.5f) * (rim * edgeCubed); + color += Hlsl.Lerp(albedo, new Float3(1f, 1f, 1f), InflateSettings.RimWhiteMix) * (rim * edgeCubed); color = Hlsl.Saturate(color); output[new Int2(x, y)] = new Float4(color.X * alpha, color.Y * alpha, color.Z * alpha, alpha); diff --git a/Inflate/InflateSettings.cs b/Inflate/InflateSettings.cs index 719fdb8..31dd79d 100644 --- a/Inflate/InflateSettings.cs +++ b/Inflate/InflateSettings.cs @@ -32,6 +32,9 @@ internal static class InflateSettings public const float LightWrap = 0.35f; public const float ReflectionBase = 0.15f; public const float SurfaceWhite = 0.9f; + public const float SkyBlendStart = 0.25f; + public const float SkyBlendEnd = 0.75f; + public const float RimWhiteMix = 0.5f; public const float MinimumSpecularExponent = 4f; public const float MaximumSpecularExponent = 1024f; public const float SkyRed = 0.82f;