public class PosterizationFilter extends Filter
Filter.PassdefaultPass, 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 filter subclasses.
|
void |
setGamma(float gamma)
Sets gamma level used to enhance 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, writepublic PosterizationFilter()
public PosterizationFilter(int numColors)
numColors - the desired number of colors (>0, default=8)public PosterizationFilter(int numColors,
float gamma)
numColors - the desired number of colors (>0, default=8)gamma - the desired exponent (default=0.6)protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h)
FilterinitFilter in class Filtermanager - the assetManagerrenderManager - the renderManagervp - the viewPort where this filter is renderedw - the width of the filterh - the height of the filterprotected Material getMaterial()
FiltergetMaterial in class Filterpublic void setNumColors(int numColors)
numColors - the desired number of colors (>0, default=8)public void setGamma(float gamma)
gamma - the desired exponent (default=0.6)public void setStrength(float strength)
strength - the desired influence factor (default=1)public int getNumColors()
public float getGamma()
public float getStrength()