From bfe9359a202051d4263a113d75d1058e3f196614 Mon Sep 17 00:00:00 2001 From: Manashiku <46613923+Manashiku@users.noreply.github.com> Date: Fri, 31 Mar 2023 01:26:58 -0700 Subject: [PATCH] Updated to support FACE_SHADOW_SOFTNESS value Before, it wasn't used at all. Now it works properly --- sub/shadow.fxsub | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sub/shadow.fxsub b/sub/shadow.fxsub index fa2b7f1..cb46d4e 100644 --- a/sub/shadow.fxsub +++ b/sub/shadow.fxsub @@ -37,7 +37,8 @@ float face_shading(in float2 uv) } - float shadow_step = step(angle, shadow) ; + // float shadow_step = step(angle, shadow) ; + float shadow_step = smoothstep(angle - (FACE_SHADOW_SOFTNESS + 0.001f), angle + (FACE_SHADOW_SOFTNESS + 0.001f), shadow); float facing_step = step(fdotl, 0.0f); shadow_step = shadow_step * facing_step;