Filter.PassdefaultPass, enabled, material, postRenderPasses, processor| Constructor and Description |
|---|
ContrastAdjustmentFilter()
Instantiates a contrast-adjustment filter with the default parameters:
|
ContrastAdjustmentFilter(float exponent)
Instantiates a contrast-adjustment filter with the default input range and output scaling.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getBlueExponent()
Retrieves the blue-channel exponent.
|
float |
getBlueScale()
Retrieves the output scale factor for the blue channel.
|
float |
getGreenExponent()
Retrieves the green-channel exponent.
|
float |
getGreenScale()
Retrieves the output scale factor for the green channel.
|
float |
getLowerLimit()
Returns the lower limit of the input range.
|
protected Material |
getMaterial()
Returns the Material used in this Filter.
|
float |
getRedExponent()
Retrieves the red-channel exponent.
|
float |
getRedScale()
Retrieves the output scale factor for the red channel.
|
float |
getUpperLimit()
Returns the upper limit of the input range.
|
protected void |
initFilter(AssetManager assetManager,
RenderManager renderManager,
ViewPort viewPort,
int width,
int height)
Initializes the Filter when it is added to a FilterPostProcessor.
|
void |
read(JmeImporter im)
De-serializes this filter, for example when loading from a J3O file.
|
ContrastAdjustmentFilter |
setBlueExponent(float exponent)
Sets the power-law exponent for the blue channel.
|
ContrastAdjustmentFilter |
setBlueScale(float factor)
Sets the output scale factor for the blue channel.
|
ContrastAdjustmentFilter |
setExponents(float redExponent,
float greenExponent,
float blueExponent)
Sets the power-law exponent for each color channel.
|
ContrastAdjustmentFilter |
setGreenExponent(float exponent)
Sets the power-law exponent for the green channel.
|
ContrastAdjustmentFilter |
setGreenScale(float factor)
Sets the output scale factor for the green channel.
|
ContrastAdjustmentFilter |
setInputRange(float lowerLimit,
float upperLimit)
Sets the input range for each color channel.
|
ContrastAdjustmentFilter |
setLowerLimit(float level)
Sets the lower limit of the input range.
|
ContrastAdjustmentFilter |
setRedExponent(float exponent)
Sets the power-law exponent for the red channel.
|
ContrastAdjustmentFilter |
setRedScale(float factor)
Sets the output scale factor for the red channel.
|
ContrastAdjustmentFilter |
setScales(float redScale,
float greenScale,
float blueScale)
Adjusts the output scaling for each color channel.
|
ContrastAdjustmentFilter |
setUpperLimit(float level)
Sets the upper limit of the input range.
|
java.lang.String |
toString()
Represent this Filter as a String.
|
void |
write(JmeExporter ex)
Serializes this filter, for example when saving to a J3O file.
|
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBufferpublic ContrastAdjustmentFilter()
input range from 0 to 1
power-law exponent=1 for all color channels
output scale factor=1 for all color channels Such a filter has no effect.
public ContrastAdjustmentFilter(float exponent)
exponent - the desired power-law exponent for all color channelspublic ContrastAdjustmentFilter setExponents(float redExponent, float greenExponent, float blueExponent)
redExponent - the desired red-channel exponentgreenExponent - the desired green-channel exponentblueExponent - the desired blue-channel exponentpublic ContrastAdjustmentFilter setRedExponent(float exponent)
exponent - the desired exponent (default=1 for linear)public ContrastAdjustmentFilter setGreenExponent(float exponent)
exponent - the desired exponent (default=1 for linear)public ContrastAdjustmentFilter setBlueExponent(float exponent)
exponent - the desired exponent (default=1 for linear)public float getRedExponent()
public float getGreenExponent()
public float getBlueExponent()
public ContrastAdjustmentFilter setInputRange(float lowerLimit, float upperLimit)
Before applying the power law, the input levels get normalized: lowerLimit and below normalize to 0 and upperLimit normalizes to 1.
lowerLimit - the desired lower limit (default=0)upperLimit - the desired upper limit (default=1)public ContrastAdjustmentFilter setUpperLimit(float level)
level - the input level that should be normalized to 1 (default=1)public ContrastAdjustmentFilter setLowerLimit(float level)
level - the highest input level that should be normalized to 0 (default=0)public float getLowerLimit()
public float getUpperLimit()
public ContrastAdjustmentFilter setScales(float redScale, float greenScale, float blueScale)
redScale - the red-channel scale factorgreenScale - the green-channel scale factorblueScale - the blue-channel scale factorpublic ContrastAdjustmentFilter setRedScale(float factor)
factor - the desired scale factor (default=1)public ContrastAdjustmentFilter setGreenScale(float factor)
factor - the desired scale factor (default=1)public ContrastAdjustmentFilter setBlueScale(float factor)
factor - the desired scale factor (default=1)public float getRedScale()
public float getGreenScale()
public float getBlueScale()
protected void initFilter(AssetManager assetManager, RenderManager renderManager, ViewPort viewPort, int width, int height)
initFilter in class FilterassetManager - for loading assets (not null)renderManager - unusedviewPort - unusedwidth - unusedheight - unusedprotected Material getMaterial()
getMaterial in class Filterpublic void read(JmeImporter im) throws java.io.IOException
public void write(JmeExporter ex) throws java.io.IOException
public java.lang.String toString()
toString in class java.lang.Object