Skip to content

Commit 5f55179

Browse files
Fix SDF font outline sizes. (#435)
1 parent b101e01 commit 5f55179

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

UnleashedRecomp/gpu/shader/imgui_ps.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ float4 SampleSdfFont(float4 color, Texture2D<float4> texture, float2 uv, float2
9090
float screenPxRange = max(0.5 * dot(unitRange, screenTexSize), 1.0);
9191

9292
float sd = median(textureColor.r, textureColor.g, textureColor.b) - 0.5;
93-
float screenPxDistance = screenPxRange * (sd + g_PushConstants.Outline / (pxRange * 2.0));
93+
float screenPxDistance = screenPxRange * (sd + g_PushConstants.Outline / (pxRange * 1.5));
9494

9595
if (g_PushConstants.ShaderModifier == IMGUI_SHADER_MODIFIER_TITLE_BEVEL)
9696
{
@@ -100,7 +100,7 @@ float4 SampleSdfFont(float4 color, Texture2D<float4> texture, float2 uv, float2
100100

101101
float cosTheta = dot(normal, normalize(float2(1, 1)));
102102
float3 gradient = lerp(color.rgb, cosTheta >= 0.0 ? rimColor : shadowColor, abs(cosTheta));
103-
color.rgb = lerp(gradient, color.rgb, pow(saturate(sd + 0.8), 32.0));
103+
color.rgb = lerp(gradient, color.rgb, pow(saturate(sd + 0.77), 32.0));
104104
}
105105
else if (g_PushConstants.ShaderModifier == IMGUI_SHADER_MODIFIER_CATEGORY_BEVEL)
106106
{

0 commit comments

Comments
 (0)