private void buildMatCache(GeometryList l) {
        matCache.clear();
        for (int i = 0; i < l.size(); i++) {
            Material mat = l.get(i).getMaterial();
            //checking if the material has the post technique and adding it to the material cache
            if (mat.getMaterialDef().getTechniqueDefs(postTechniqueName) != null) {
                if (!matCache.contains(mat)) {
                    matCache.add(mat);
                }
            } else {
                needsfallBackMaterial = true;
            }
        }
    }
This method is called once per frame and is responsible for setting any
material parameters that subclasses may need to set on the post material.

@param material the material to use for the post shadow pass
jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java