Пример #1
0
 public void read(JmeImporter im) throws IOException {
   InputCapsule ic = im.getCapsule(this);
   numSamples = ic.readInt("numSamples", 0);
   filters = ic.readSavableArrayList("filters", null);
   for (Filter filter : filters) {
     filter.setProcessor(this);
     setFilterState(filter, filter.isEnabled());
   }
   assetManager = im.getAssetManager();
 }
Пример #2
0
 /**
  * init the given filter
  *
  * @param filter
  * @param vp
  */
 private void initFilter(Filter filter, ViewPort vp) {
   filter.setProcessor(this);
   if (filter.isRequiresDepthTexture()) {
     if (!computeDepth && renderFrameBuffer != null) {
       depthTexture = new Texture2D(width, height, Format.Depth24);
       renderFrameBuffer.setDepthTexture(depthTexture);
     }
     computeDepth = true;
     filter.init(assetManager, renderManager, vp, width, height);
     filter.setDepthTexture(depthTexture);
   } else {
     filter.init(assetManager, renderManager, vp, width, height);
   }
 }