Package com.jme3.post.filters
Class FXAAFilter
java.lang.Object
com.jme3.post.Filter
com.jme3.post.filters.FXAAFilter
- All Implemented Interfaces:
Savable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.post.Filter
Filter.Pass -
Field Summary
Fields inherited from class com.jme3.post.Filter
defaultPass, enabled, material, postRenderPasses, processor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MaterialMust return the material used for this filter.floatfloatfloatfloatprotected voidinitFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Initialization of filter subclasses.protected booleanOverride this method and return true if you want the scene (input) texture to use bilinear filtering or false to use nearest filtering.voidread(JmeImporter importer) Load properties when the filter is de-serialized, for example when loading from a J3O file.voidsetReduceMul(float reduceMul) set to 0.0f for higher qualityvoidsetSpanMax(float spanMax) voidsetSubPixelShift(float subPixelShift) set to 0.0f for higher qualityvoidsetVxOffset(float vxOffset) voidwrite(JmeExporter exporter) Save properties when the filter is serialized, for example when saving to a J3O file.Methods inherited from class com.jme3.post.Filter
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
-
Constructor Details
-
FXAAFilter
public FXAAFilter()
-
-
Method Details
-
initFilter
protected 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 classFilter- Parameters:
manager- the assetManagerrenderManager- the renderManagervp- the viewPort where this filter is renderedw- the width of the filterh- the height of the filter
-
getMaterial
Description copied from class:FilterMust return the material used for this filter. this method is called every frame.- Specified by:
getMaterialin classFilter- Returns:
- the material used for this filter.
-
isRequiresBilinear
protected boolean isRequiresBilinear()Description copied from class:FilterOverride this method and return true if you want the scene (input) texture to use bilinear filtering or false to use nearest filtering. Typically, filters that perform samples in between pixels should enable bilinear filtering.- Overrides:
isRequiresBilinearin classFilter- Returns:
- true to use linear filtering, false to use nearest filtering.
-
setSpanMax
public void setSpanMax(float spanMax) -
setSubPixelShift
public void setSubPixelShift(float subPixelShift) set to 0.0f for higher quality- Parameters:
subPixelShift- the desired shift (default=0.25)
-
setReduceMul
public void setReduceMul(float reduceMul) set to 0.0f for higher quality- Parameters:
reduceMul- the desired value (default=0.125)
-
setVxOffset
public void setVxOffset(float vxOffset) -
getReduceMul
public float getReduceMul() -
getSpanMax
public float getSpanMax() -
getSubPixelShift
public float getSubPixelShift() -
getVxOffset
public float getVxOffset() -
read
Load properties when the filter is de-serialized, for example when loading from a J3O file.- Specified by:
readin interfaceSavable- Overrides:
readin classFilter- Parameters:
importer- the importer to use (not null)- Throws:
IOException- from the importer
-
write
Save properties when the filter is serialized, for example when saving to a J3O file.- Specified by:
writein interfaceSavable- Overrides:
writein classFilter- Parameters:
exporter- the exporter to use (not null)- Throws:
IOException- from the exporter
-