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

cleanup_build_scripts v3.1.0-beta2
Nehon 8 years ago
parent 69d8e5d13e
commit a71fb286f4
  1. 2
      jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.frag

@ -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);

Loading…
Cancel
Save