public class PosterizationFilter extends Filter
Filter.Pass
defaultPass, enabled, material, postRenderPasses, processor
Constructor and Description |
---|
PosterizationFilter()
Creates a posterization Filter
|
PosterizationFilter(int numColors)
Creates a posterization Filter with the given number of colors
|
PosterizationFilter(int numColors,
float gamma)
Creates a posterization Filter with the given number of colors and gamma
|
Modifier and Type | Method and Description |
---|---|
float |
getGamma()
Returns current gamma value
|
protected Material |
getMaterial()
Must return the material used for this filter.
|
int |
getNumColors()
Returns number of color levels used
|
float |
getStrength()
Returns current strength value, i.e.
|
protected void |
initFilter(AssetManager manager,
RenderManager renderManager,
ViewPort vp,
int w,
int h)
Initialization of sub classes filters
This method is called once when the filter is added to the FilterPostProcessor
It should contain Material initializations and extra passes initialization
|
void |
setGamma(float gamma)
Sets gamma level used to enhange visual quality
|
void |
setNumColors(int numColors)
Sets number of color levels used to draw the screen
|
void |
setStrength(float strength)
Sets current strength value, i.e.
|
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, read, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer, write
public PosterizationFilter()
public PosterizationFilter(int numColors)
numColors
- public PosterizationFilter(int numColors, float gamma)
numColors
- gamma
- protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h)
Filter
initFilter
in class Filter
manager
- the assetManagerrenderManager
- the renderManagervp
- the viewPort where this filter is renderedw
- the width of the filterh
- the height of the filterprotected Material getMaterial()
Filter
getMaterial
in class Filter
public void setNumColors(int numColors)
public void setGamma(float gamma)
public void setStrength(float strength)
public int getNumColors()
public float getGamma()
public float getStrength()