/** * * !! WARNING !! this parameter is defaulted to true for the ShadowFilter. * Setting it to true, may produce edges artifacts on shadows. * * * Set to true if you want back faces shadows on geometries. * Note that back faces shadows will be blended over dark lighten areas and may produce overly dark lighting. * * Setting this parameter will override this parameter for ALL materials in the scene. * This also will automatically adjust the faceCullMode and the PolyOffset of the pre shadow pass. * You can modify them by using {@link #getPreShadowForcedRenderState()} * * If you want to set it differently for each material in the scene you have to use the ShadowRenderer instead * of the shadow filter. * * @param renderBackFacesShadows true or false. */ public void setRenderBackFacesShadows(Boolean renderBackFacesShadows) { shadowRenderer.setRenderBackFacesShadows(renderBackFacesShadows); }
/** * Abstract class constructor * * @param manager the application asset manager * @param shadowMapSize the size of the rendered shadowmaps (512,1024,2048, * etc...) * @param nbShadowMaps the number of shadow maps rendered (the more shadow * maps the more quality, the less fps). * @param shadowRenderer the shadowRenderer to use for this Filter */ @SuppressWarnings("all") protected AbstractShadowFilter(AssetManager manager, int shadowMapSize, T shadowRenderer) { super("Post Shadow"); material = new Material(manager, "Common/MatDefs/Shadow/PostShadowFilter.j3md"); this.shadowRenderer = shadowRenderer; this.shadowRenderer.setPostShadowMaterial(material); //this is legacy setting for shadows with backface shadows this.shadowRenderer.setRenderBackFacesShadows(true); }
setShadowIntensity(shadowIntensity); initForcedRenderState(); setRenderBackFacesShadows(isRenderBackFacesShadows());
/** * * !! WARNING !! this parameter is defaulted to true for the ShadowFilter. * Setting it to true, may produce edges artifacts on shadows. * * * Set to true if you want back faces shadows on geometries. * Note that back faces shadows will be blended over dark lighten areas and may produce overly dark lighting. * * Setting this parameter will override this parameter for ALL materials in the scene. * This also will automatically adjust the faceCullMode and the PolyOffset of the pre shadow pass. * You can modify them by using {@link #getPreShadowForcedRenderState()} * * If you want to set it differently for each material in the scene you have to use the ShadowRenderer instead * of the shadow filter. * * @param renderBackFacesShadows true or false. */ public void setRenderBackFacesShadows(Boolean renderBackFacesShadows) { shadowRenderer.setRenderBackFacesShadows(renderBackFacesShadows); }
/** * Abstract class constructor * * @param manager the application asset manager * @param shadowMapSize the size of the rendered shadowmaps (512,1024,2048, * etc...) * @param nbShadowMaps the number of shadow maps rendered (the more shadow * maps the more quality, the less fps). * @param shadowRenderer the shadowRenderer to use for this Filter */ @SuppressWarnings("all") protected AbstractShadowFilter(AssetManager manager, int shadowMapSize, T shadowRenderer) { super("Post Shadow"); material = new Material(manager, "Common/MatDefs/Shadow/PostShadowFilter.j3md"); this.shadowRenderer = shadowRenderer; this.shadowRenderer.setPostShadowMaterial(material); //this is legacy setting for shadows with backface shadows this.shadowRenderer.setRenderBackFacesShadows(true); }
setShadowIntensity(shadowIntensity); initForcedRenderState(); setRenderBackFacesShadows(isRenderBackFacesShadows());