From e3191eb26ac2fb8142c2c51565406fe2846461a4 Mon Sep 17 00:00:00 2001 From: D-AIRY <admin@ds-servers.com> Date: Thu, 2 Apr 2020 00:03:56 +0300 Subject: [PATCH] minor PSSM quality fix --- build/engine/shaders/ppgensm/ppgensm_pssm.ps | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/engine/shaders/ppgensm/ppgensm_pssm.ps b/build/engine/shaders/ppgensm/ppgensm_pssm.ps index c6547d523..692ed9b49 100644 --- a/build/engine/shaders/ppgensm/ppgensm_pssm.ps +++ b/build/engine/shaders/ppgensm/ppgensm_pssm.ps @@ -111,7 +111,12 @@ float4 main(VSO_ResPos IN): COLOR0 float ls_t_hit = dot(vNormalLS, vPixelPosLS.xyz) / dot(vNormalLS, lsGridLineDir); float3 ls_hit_p = ls_t_hit * lsGridLineDir; - float constantBias = fBaseBias[split]; + // float constantBias = fBaseBias[split]; + + // float constantBias = 0.000001f; + float fDoubledInversedViewWidth = g_mMatrixTextureV[split][0][0]; + float constantBias = delta * 0.0007f/* * pow(2, split) */ /* * pow(1.0 / fDoubledInversedViewWidth, 1.0f + (float)split) */ / fDoubledInversedViewWidth; + /** Compute Adaptive Epsilon **/ // Normalized depth value in shadow map -- GitLab