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 voidaddImpliedEffects(List<PostProcessingEffect> effects)Adding all effects that will be implied by this effect to the list.ColorgetColor()floatgetDensity()Getting fogs density.floatgetGradient()Getting fogs gradient.voidsetBlending(boolean blending)Enable or disable blending.voidsetDensity(float density)Setting fogs density.voidsetGradient(float gradient)Setting fogs gradient.protected voidsetUniforms()-
Methods inherited from class de.coreengine.rendering.renderer.ppeffects.PostProcessingEffect
exit, prepare
-
-
-
-
Method Detail
-
setUniforms
protected void setUniforms()
- Specified by:
setUniformsin 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:PostProcessingEffectAdding all effects that will be implied by this effect to the list.- Specified by:
addImpliedEffectsin classPostProcessingEffect- Parameters:
effects- List to add implied effects
-
-