Package com.jme3.post.filters
Class ComposeFilter
java.lang.Object
com.jme3.post.Filter
com.jme3.post.filters.ComposeFilter
- All Implemented Interfaces:
- Savable
This filter composes a texture with the viewport texture. This is used to
 compose post-processed texture from another viewport.
 the compositing is done using the alpha value of the viewportTexture :
 mix(compositeTextureColor, viewPortColor, viewportColor.alpha);
 It's important for a good result that the viewport clear color alpha be 0.
- 
Nested Class SummaryNested classes/interfaces inherited from class com.jme3.post.FilterFilter.Pass
- 
Field SummaryFields inherited from class com.jme3.post.FilterdefaultPass, enabled, material, postRenderPasses, processor
- 
Constructor SummaryConstructorsConstructorDescriptioncreates a ComposeFilterComposeFilter(Texture2D compositeTexture) creates a ComposeFilter with the given texture
- 
Method SummaryModifier and TypeMethodDescriptionprotected MaterialMust return the material used for this filter.protected voidinitFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Initialization of filter subclasses.voidread(JmeImporter im) Override this method if you want to load extra properties when the filter is loaded else only basic properties of the filter will be loaded This method should always begin by super.read(im);voidsetCompositeTexture(Texture2D compositeTexture) sets the compositeTexturevoidwrite(JmeExporter ex) Override this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved This method should always begin by super.write(ex);Methods inherited from class com.jme3.post.Filtercleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
- 
Constructor Details- 
ComposeFilterpublic ComposeFilter()creates a ComposeFilter
- 
ComposeFiltercreates a ComposeFilter with the given texture- Parameters:
- compositeTexture- the texture to use (alias created)
 
 
- 
- 
Method Details- 
getMaterialDescription copied from class:FilterMust return the material used for this filter. this method is called every frame.- Specified by:
- getMaterialin class- Filter
- Returns:
- the material used for this filter.
 
- 
getCompositeTexture- Returns:
- the compositeTexture
 
- 
setCompositeTexturesets the compositeTexture- Parameters:
- compositeTexture- the desired texture (alias created)
 
- 
initFilterprotected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Description copied from class:FilterInitialization of filter subclasses. This method is called once when the filter is added to the FilterPostProcessor It should contain Material initializations and extra passes initialization- Specified by:
- initFilterin class- Filter
- Parameters:
- manager- the assetManager
- renderManager- the renderManager
- vp- the viewPort where this filter is rendered
- w- the width of the filter
- h- the height of the filter
 
- 
writeDescription copied from class:FilterOverride this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved This method should always begin by super.write(ex);- Specified by:
- writein interface- Savable
- Overrides:
- writein class- Filter
- Parameters:
- ex- the exporter (not null)
- Throws:
- IOException- from the exporter
 
- 
readDescription copied from class:FilterOverride this method if you want to load extra properties when the filter is loaded else only basic properties of the filter will be loaded This method should always begin by super.read(im);- Specified by:
- readin interface- Savable
- Overrides:
- readin class- Filter
- Throws:
- IOException
 
 
-