public class LightScatteringFilter
extends com.jme3.post.Filter
| Constructor and Description |
|---|
LightScatteringFilter()
creates a lightScattering filter
|
LightScatteringFilter(com.jme3.math.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) |
com.jme3.math.Vector3f |
getLightPosition()
returns the light position
|
protected com.jme3.material.Material |
getMaterial() |
int |
getNbSamples()
returns the number of samples for the radial blur
|
protected void |
initFilter(com.jme3.asset.AssetManager manager,
com.jme3.renderer.RenderManager renderManager,
com.jme3.renderer.ViewPort vp,
int w,
int h) |
protected boolean |
isRequiresDepthTexture() |
protected void |
postQueue(com.jme3.renderer.queue.RenderQueue queue) |
void |
read(com.jme3.export.JmeImporter 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(com.jme3.math.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(com.jme3.export.JmeExporter ex) |
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, postFrame, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBufferpublic LightScatteringFilter()
public LightScatteringFilter(com.jme3.math.Vector3f lightPosition)
lightPosition - the desired location (in world coordinates, alias
created)protected boolean isRequiresDepthTexture()
isRequiresDepthTexture in class com.jme3.post.Filterprotected com.jme3.material.Material getMaterial()
getMaterial in class com.jme3.post.Filterprotected void postQueue(com.jme3.renderer.queue.RenderQueue queue)
postQueue in class com.jme3.post.Filterprotected void initFilter(com.jme3.asset.AssetManager manager,
com.jme3.renderer.RenderManager renderManager,
com.jme3.renderer.ViewPort vp,
int w,
int h)
initFilter in class com.jme3.post.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 com.jme3.math.Vector3f getLightPosition()
public void setLightPosition(com.jme3.math.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(com.jme3.export.JmeExporter ex)
throws java.io.IOException
write in interface com.jme3.export.Savablewrite in class com.jme3.post.Filterjava.io.IOExceptionpublic void read(com.jme3.export.JmeImporter im)
throws java.io.IOException
read in interface com.jme3.export.Savableread in class com.jme3.post.Filterjava.io.IOException