public class BloomFilter extends Filter
Modifier and Type | Class and Description |
---|---|
static class |
BloomFilter.GlowMode
GlowMode specifies if the glow will be applied to the whole scene or to objects that have a glow color or a glow map
|
Filter.Pass
defaultPass, enabled, material, postRenderPasses, processor
Constructor and Description |
---|
BloomFilter()
Creates a Bloom filter
|
BloomFilter(BloomFilter.GlowMode glowMode)
Creates the bloom filter with the specified glow mode
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanUpFilter(Renderer r)
override this method if you have some cleanup to do
|
float |
getBloomIntensity()
returns the bloom intensity
|
float |
getBlurScale()
returns the blur scale
|
float |
getDownSamplingFactor()
returns the downSampling factor
for more details see setDownSamplingFactor(float downSamplingFactor) |
float |
getExposureCutOff()
returns the exposure cutoff
for more details see setExposureCutOff(float exposureCutOff) |
float |
getExposurePower()
returns the exposure power
for more details see setExposurePower(float exposurePower) |
protected Material |
getMaterial()
Must return the material used for this filter.
|
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
|
protected void |
postQueue(RenderQueue queue)
Override this method if you want to make a pre pass, before the actual rendering of the frame
|
void |
read(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);
|
protected void |
reInitFilter() |
void |
setBloomIntensity(float bloomIntensity)
intensity of the bloom effect default is 2.0
|
void |
setBlurScale(float blurScale)
sets The spread of the bloom default is 1.5f
|
void |
setDownSamplingFactor(float downSamplingFactor)
Sets the downSampling factor : the size of the computed texture will be divided by this factor.
|
void |
setExposureCutOff(float exposureCutOff)
Define the color threshold on which the bloom will be applied (0.0 to 1.0)
|
void |
setExposurePower(float exposurePower)
defines how many times the bloom extracted color will be multiplied by itself.
|
void |
write(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);
|
cleanup, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
public BloomFilter()
public BloomFilter(BloomFilter.GlowMode glowMode)
glowMode
- the desired mode (default=Scene)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 void reInitFilter()
protected Material getMaterial()
Filter
getMaterial
in class Filter
protected void postQueue(RenderQueue queue)
Filter
protected void cleanUpFilter(Renderer r)
Filter
cleanUpFilter
in class Filter
r
- the rendererpublic float getBloomIntensity()
public void setBloomIntensity(float bloomIntensity)
bloomIntensity
- the desired intensity (default=2)public float getBlurScale()
public void setBlurScale(float blurScale)
blurScale
- the desired scale (default=1.5)public float getExposureCutOff()
setExposureCutOff(float exposureCutOff)
public void setExposureCutOff(float exposureCutOff)
exposureCutOff
- the desired threshold (≥0, ≤1, default=0)public float getExposurePower()
setExposurePower(float exposurePower)
public void setExposurePower(float exposurePower)
exposurePower
- the desired exponent (default=5)public float getDownSamplingFactor()
setDownSamplingFactor(float downSamplingFactor)
public void setDownSamplingFactor(float downSamplingFactor)
downSamplingFactor
- the desired factor (default=1)public void write(JmeExporter ex) throws java.io.IOException
Filter
public void read(JmeImporter im) throws java.io.IOException
Filter