Fixed shadow fade and zfar computation as it was breaking shadow border filtering.

This commit is contained in:
Nehon 2016-11-20 23:55:06 +01:00
parent 35de6d9fda
commit 11562f88cf

View File

@ -80,7 +80,7 @@ void main(){
#endif #endif
#ifdef FADE #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 #endif
shadow = shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity); shadow = shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity);