From 228dd863602ea307cfc11d7cdcdb4cd48339f910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Sun, 28 Jul 2024 18:36:30 +0200 Subject: [PATCH] shadow border clamp fix --- WickedEngine/shaders/shadowHF.hlsli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WickedEngine/shaders/shadowHF.hlsli b/WickedEngine/shaders/shadowHF.hlsli index 2c87d2ccc..f221d3554 100644 --- a/WickedEngine/shaders/shadowHF.hlsli +++ b/WickedEngine/shaders/shadowHF.hlsli @@ -57,7 +57,7 @@ inline half3 sample_shadow(float2 uv, float cmp, float4 uv_clamping, float sprea inline float4 shadow_border_clamp(in ShaderEntity light, in float slice) { const float2 shadow_resolution = light.shadowAtlasMulAdd.xy * GetFrame().shadow_atlas_resolution; - const float border_size = 0.5 * GetFrame().shadow_atlas_resolution_rcp; + const float border_size = 0.75 * GetFrame().shadow_atlas_resolution_rcp; const float2 topleft = mad(float2(slice, 0), light.shadowAtlasMulAdd.xy, light.shadowAtlasMulAdd.zw) + border_size; const float2 bottomright = mad(float2(slice + 1, 1), light.shadowAtlasMulAdd.xy, light.shadowAtlasMulAdd.zw) - border_size; return float4(topleft, bottomright);