From 68c082c13ded1ceaed63a8e1047e8a4d59366b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Re=CC=81my=20Bouquet?= Date: Fri, 12 Aug 2016 18:25:09 +0200 Subject: [PATCH] fixed transparent shadows on mac. --- .../src/main/resources/Common/MatDefs/Light/Lighting.j3md | 8 ++++++++ .../java/jme3test/light/TestDirectionalLightShadow.java | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.j3md b/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.j3md index 32076a815..606b3537a 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Light/Lighting.j3md @@ -214,6 +214,14 @@ MaterialDef Phong Lighting { INSTANCING : UseInstancing } + ForcedRenderState { + FaceCull Off + DepthTest On + DepthWrite On + PolyOffset 5 3 + ColorWrite Off + } + } diff --git a/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java b/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java index 7e5d30a6d..6e3ad412b 100644 --- a/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java +++ b/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java @@ -217,7 +217,7 @@ public class TestDirectionalLightShadow extends SimpleApplication implements Act inputManager.addMapping("fwd", new KeyTrigger(KeyInput.KEY_PGUP)); inputManager.addMapping("back", new KeyTrigger(KeyInput.KEY_PGDN)); inputManager.addMapping("pp", new KeyTrigger(KeyInput.KEY_P)); - inputManager.addMapping("backShadows", new KeyTrigger(KeyInput.KEY_B)); + inputManager.addMapping("backShadows", new KeyTrigger(KeyInput.KEY_K)); inputManager.addListener(this, "lambdaUp", "lambdaDown", "ThicknessUp", "ThicknessDown",