From 89608f3fd57d1cadd0263ebd1164450f909555cb Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Fri, 2 Nov 2012 14:47:24 +0000 Subject: [PATCH] fixed material param settings in PssmShadowRenderer git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9936 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/shadow/PssmShadowRenderer.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java b/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java index cddb5dd21..46544016e 100644 --- a/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java +++ b/engine/src/core/com/jme3/shadow/PssmShadowRenderer.java @@ -530,30 +530,31 @@ public class PssmShadowRenderer implements SceneProcessor { } } if (applyHWShadows || mat.getParam("HardwareShadows") == null) { - mat.setBoolean("HardwareShadows", compareMode == CompareMode.Hardware); - applyHWShadows = false; + mat.setBoolean("HardwareShadows", compareMode == CompareMode.Hardware); } if (applyFilterMode || mat.getParam("FilterMode") == null) { - mat.setInt("FilterMode", filterMode.ordinal()); - applyFilterMode = false; + mat.setInt("FilterMode", filterMode.ordinal()); } if (mat.getParam("PCFEdge") == null || applyPCFEdge) { - mat.setFloat("PCFEdge", edgesThickness); - applyPCFEdge = false; + mat.setFloat("PCFEdge", edgesThickness); } if (mat.getParam("ShadowIntensity") == null || applyShadowIntensity) { - mat.setFloat("ShadowIntensity", shadowIntensity); - applyShadowIntensity = false; + mat.setFloat("ShadowIntensity", shadowIntensity); } if (fadeInfo != null && mat.getParam("FadeInfo") == null || applyFadeInfo) { - mat.setVector2("FadeInfo", fadeInfo); - applyFadeInfo = false; + mat.setVector2("FadeInfo", fadeInfo); } } + applyHWShadows = false; + applyFilterMode = false; + applyPCFEdge = false; + applyShadowIntensity = false; + applyFadeInfo = false; + //At least one material of the receiving geoms does not support the post shadow techniques //so we fall back to the forced material solution (transparent shadows won't be supported for these objects) if (needsfallBackMaterial) {