Pārlūkot izejas kodu

PssmShadowRenderer : post shadow pas does not write depth anymore, also added a slight polyOffset to avoid z-fighting

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9293 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 13 gadi atpakaļ
vecāks
revīzija
4155cacf74

+ 3 - 0
engine/src/core/com/jme3/shadow/PssmShadowRenderer.java

@@ -220,6 +220,9 @@ public class PssmShadowRenderer implements SceneProcessor {
         //initializing render state for post shadow pass (modulade blending and cullmode of for back faces )
         //initializing render state for post shadow pass (modulade blending and cullmode of for back faces )
         state.setBlendMode(RenderState.BlendMode.Modulate);
         state.setBlendMode(RenderState.BlendMode.Modulate);
         state.setFaceCullMode(RenderState.FaceCullMode.Off);
         state.setFaceCullMode(RenderState.FaceCullMode.Off);
+        state.setDepthWrite(false);
+        state.setPolyOffset(-0.1f, 0);
+               
     }
     }
 
 
     /**
     /**