Ver Fonte

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

Nehon há 8 anos atrás
pai
commit
a71fb286f4

+ 1 - 1
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);