From a71fb286f47d44ee89e659cb24a99b9a6bf30fb5 Mon Sep 17 00:00:00 2001 From: Nehon Date: Sun, 20 Nov 2016 23:55:06 +0100 Subject: [PATCH] Fixed shadow fade and zfar computation as it was breaking shadow border filtering. --- .../src/main/resources/Common/MatDefs/Shadow/PostShadow.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.frag b/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.frag index a2d191895..6d1cc7a5a 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.frag +++ b/jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.frag @@ -80,7 +80,7 @@ void main(){ #endif #ifdef FADE - shadow = max(0.0,mix(shadow,1.0,(shadowPosition - m_FadeInfo.x) * m_FadeInfo.y)); + shadow = max(0.0, mix(shadow, 1.0, max(0.0, (shadowPosition - m_FadeInfo.x) * m_FadeInfo.y))); #endif shadow = shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity);