Class LightScatteringPPShader
- java.lang.Object
-
- de.coreengine.rendering.programs.Shader
-
- de.coreengine.rendering.programs.pp.PPShader
-
- de.coreengine.rendering.programs.pp.LightScatteringPPShader
-
public class LightScatteringPPShader extends PPShader
Shader for the light scattering effect- Author:
- Darius Dinger
-
-
Field Summary
-
Fields inherited from class de.coreengine.rendering.programs.Shader
SHADERS_LOCATION
-
-
Constructor Summary
Constructors Constructor Description LightScatteringPPShader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetPPFragShaderFile()voidprepareEffect(float intensity, float brightness, int quality)Preparing shader for the next sunvoidreloadSun()Realoading sun origin into shadervoidsetSize(javax.vecmath.Vector2f size)Setting the size of the next to blur image texel.
vec2(1.0f / image.width, 1.0f / image.height)voidsetSunTexture(int texture)protected voidsetUniformLocations()Setting the effect shader relevant uniforms.-
Methods inherited from class de.coreengine.rendering.programs.pp.PPShader
addShaders, bindAttribs, loadUniforms, setBaseTexture
-
Methods inherited from class de.coreengine.rendering.programs.Shader
addShader, bindAttribute, bindTexture, bindTextureUnit, getUniformLocation, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniform, setUniformArray1f, setUniformArray1i, setUniformArray2f, setUniformArray3f, start, stop
-
-
-
-
Method Detail
-
getPPFragShaderFile
protected String getPPFragShaderFile()
- Specified by:
getPPFragShaderFilein classPPShader
-
setUniformLocations
protected void setUniformLocations()
Description copied from class:PPShaderSetting the effect shader relevant uniforms.- Specified by:
setUniformLocationsin classPPShader
-
setSunTexture
public void setSunTexture(int texture)
- Parameters:
texture- TextureData id of the sun buffer
-
prepareEffect
public void prepareEffect(float intensity, float brightness, int quality)Preparing shader for the next sun- Parameters:
intensity- Intensity of the light scattersbrightness- Brightness of the light scattersquality- Quality of the light scatters
-
reloadSun
public void reloadSun()
Realoading sun origin into shader
-
setSize
public void setSize(javax.vecmath.Vector2f size)
Setting the size of the next to blur image texel.
vec2(1.0f / image.width, 1.0f / image.height)- Parameters:
size- Size of a texel of the next to blur image
-
-