Class LightScatteringPPShader


  • public class LightScatteringPPShader
    extends PPShader
    Shader for the light scattering effect
    Author:
    Darius Dinger
    • Constructor Detail

      • LightScatteringPPShader

        public LightScatteringPPShader()
    • Method Detail

      • setUniformLocations

        protected void setUniformLocations()
        Description copied from class: PPShader
        Setting the effect shader relevant uniforms.
        Specified by:
        setUniformLocations in class PPShader
      • 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 scatters
        brightness - Brightness of the light scatters
        quality - 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