Class FogEffect
- java.lang.Object
-
- de.coreengine.rendering.renderer.ppeffects.PostProcessingEffect
-
- de.coreengine.rendering.renderer.ppeffects.FogEffect
-
public class FogEffect extends PostProcessingEffect
Fog effect for the post processer- Author:
- Darius Dinger
-
-
Field Summary
-
Fields inherited from class de.coreengine.rendering.renderer.ppeffects.PostProcessingEffect
shader
-
-
Constructor Summary
Constructors Constructor Description FogEffect()
Creating new fog effect
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addImpliedEffects(List<PostProcessingEffect> effects)
Adding all effects that will be implied by this effect to the list.Color
getColor()
float
getDensity()
Getting fogs density.float
getGradient()
Getting fogs gradient.void
setBlending(boolean blending)
Enable or disable blending.void
setDensity(float density)
Setting fogs density.void
setGradient(float gradient)
Setting fogs gradient.protected void
setUniforms()
-
Methods inherited from class de.coreengine.rendering.renderer.ppeffects.PostProcessingEffect
exit, prepare
-
-
-
-
Method Detail
-
setUniforms
protected void setUniforms()
- Specified by:
setUniforms
in classPostProcessingEffect
-
setDensity
public void setDensity(float density)
Setting fogs density. Fog visibility will be calculated by this formula:
f(x) = e^-(density * x)^gradient- Parameters:
density
- Fogs new density
-
setGradient
public void setGradient(float gradient)
Setting fogs gradient. Fog visibility will be calculated by this formula:
f(x) = e^-(density * x)^gradient- Parameters:
gradient
- Fogs new gradient
-
getColor
public Color getColor()
- Returns:
- Color of the fog
-
getDensity
public float getDensity()
Getting fogs density. Fog visibility will be calculated by this formula:
f(x) = e^-(density * x)^gradient- Returns:
- Fogs density
-
getGradient
public float getGradient()
Getting fogs gradient. Fog visibility will be calculated by this formula:
f(x) = e^-(density * x)^gradient- Returns:
- Fogs gradient
-
setBlending
public void setBlending(boolean blending)
Enable or disable blending. When enabled the fog will blend into the background. For example skybox.- Parameters:
blending
- New blending status
-
addImpliedEffects
public void addImpliedEffects(List<PostProcessingEffect> effects)
Description copied from class:PostProcessingEffect
Adding all effects that will be implied by this effect to the list.- Specified by:
addImpliedEffects
in classPostProcessingEffect
- Parameters:
effects
- List to add implied effects
-
-