fixed an isue in shadow shaders where shadows outside of the shadowZExtend were dark instead of light.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9905 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent f7db40695f
commit a5b8b48ea1
  1. 2
      engine/src/core-data/Common/MatDefs/Shadow/PostShadowFilter.frag
  2. 2
      engine/src/core-data/Common/MatDefs/Shadow/PostShadowFilter15.frag
  3. 2
      engine/src/core-data/Common/MatDefs/Shadow/PostShadowPSSM.frag
  4. 2
      engine/src/core-data/Common/MatDefs/Shadow/PostShadowPSSM15.frag

@ -59,6 +59,8 @@ void main(){
}else if( shadowPosition < m_Splits.w){ }else if( shadowPosition < m_Splits.w){
shadowBorderScale = 0.125; shadowBorderScale = 0.125;
shadow = GETSHADOW(m_ShadowMap3, projCoord3); shadow = GETSHADOW(m_ShadowMap3, projCoord3);
}else{
shadow = 1.0;
} }
shadow= shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity); shadow= shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity);

@ -59,6 +59,8 @@ float shadow = 0.0;
}else if( shadowPosition < m_Splits.w){ }else if( shadowPosition < m_Splits.w){
shadowBorderScale = 0.125; shadowBorderScale = 0.125;
shadow = GETSHADOW(m_ShadowMap3, projCoord3); shadow = GETSHADOW(m_ShadowMap3, projCoord3);
}else{
shadow = 1.0;
} }
shadow= shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity); shadow= shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity);

@ -42,6 +42,8 @@ void main(){
}else if( shadowPosition < m_Splits.w){ }else if( shadowPosition < m_Splits.w){
shadowBorderScale = 0.125; shadowBorderScale = 0.125;
shadow = GETSHADOW(m_ShadowMap3, projCoord3); shadow = GETSHADOW(m_ShadowMap3, projCoord3);
}else{
shadow = 1.0;
} }
shadow = shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity); shadow = shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity);

@ -44,6 +44,8 @@ void main(){
}else if( shadowPosition < m_Splits.w){ }else if( shadowPosition < m_Splits.w){
shadowBorderScale = 0.125; shadowBorderScale = 0.125;
shadow = GETSHADOW(m_ShadowMap3, projCoord3); shadow = GETSHADOW(m_ShadowMap3, projCoord3);
}else{
shadow = 1.0;
} }
shadow= shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity); shadow= shadow * m_ShadowIntensity + (1.0 - m_ShadowIntensity);

Loading…
Cancel
Save