Filter.Pass
defaultPass, enabled, material, postRenderPasses, processor
Constructor and Description |
---|
LightScatteringFilter()
creates a lightScattering filter
|
LightScatteringFilter(Vector3f lightPosition)
Creates a lightScatteringFilter
|
Modifier and Type | Method and Description |
---|---|
float |
getBlurStart()
returns the blur start of the scattering
see
setBlurStart(float blurStart) |
float |
getBlurWidth()
returns the blur width
see setBlurWidth(float blurWidth) |
float |
getLightDensity()
returns the light density
see
setLightDensity(float lightDensity) |
Vector3f |
getLightPosition()
returns the light position
|
protected Material |
getMaterial()
Must return the material used for this filter.
|
int |
getNbSamples()
returns the number of samples for the radial blur
|
protected void |
initFilter(AssetManager manager,
RenderManager renderManager,
ViewPort vp,
int w,
int h)
Initialization of filter subclasses.
|
protected boolean |
isRequiresDepthTexture()
Override this method and return true if your Filter needs the depth texture
|
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);
|
void |
setBlurStart(float blurStart)
sets the blur start
at which distance from the light source the effect starts default is 0.02 |
void |
setBlurWidth(float blurWidth)
sets the blur width default is 0.9
|
void |
setLightDensity(float lightDensity)
sets how much the effect is visible over the rendered scene default is 1.4
|
void |
setLightPosition(Vector3f lightPosition)
sets the light position
|
void |
setNbSamples(int nbSamples)
sets the number of samples for the radial blur default is 50
the higher the value the higher the quality, but the slower the performance.
|
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, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, postFrame, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
public LightScatteringFilter()
public LightScatteringFilter(Vector3f lightPosition)
lightPosition
- the desired location (in world coordinates, alias
created)protected boolean isRequiresDepthTexture()
Filter
isRequiresDepthTexture
in class Filter
protected Material getMaterial()
Filter
getMaterial
in class Filter
protected void postQueue(RenderQueue queue)
Filter
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 filterpublic float getBlurStart()
setBlurStart(float blurStart)
public void setBlurStart(float blurStart)
blurStart
- the desired start distance (in world units,
default=0.02)public float getBlurWidth()
setBlurWidth(float blurWidth)
public void setBlurWidth(float blurWidth)
blurWidth
- the desired width (default=0.9)public float getLightDensity()
setLightDensity(float lightDensity)
public void setLightDensity(float lightDensity)
lightDensity
- the desired density (default=1.4)public Vector3f getLightPosition()
public void setLightPosition(Vector3f lightPosition)
lightPosition
- the desired location (in world coordinates, alias
created)public int getNbSamples()
public void setNbSamples(int nbSamples)
nbSamples
- the desired number of samples (default=50)public void write(JmeExporter ex) throws java.io.IOException
Filter
public void read(JmeImporter im) throws java.io.IOException
Filter