Skip to content

Commit a71fb28

Browse files
committed
Fixed shadow fade and zfar computation as it was breaking shadow border filtering.
1 parent 69d8e5d commit a71fb28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jme3-core/src/main/resources/Common/MatDefs/Shadow/PostShadow.frag

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void main(){
8080
#endif
8181

8282
#ifdef FADE
83-
shadow = max(0.0,mix(shadow,1.0,(shadowPosition - m_FadeInfo.x) * m_FadeInfo.y));
83+
shadow = max(0.0, mix(shadow, 1.0, max(0.0, (shadowPosition - m_FadeInfo.x) * m_FadeInfo.y)));
8484
#endif
8585

8686
shadow = shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity);

0 commit comments

Comments
 (0)