Package postprocess

Class HorizontalBlur

java.lang.Object
postprocess.PostProcessStep
postprocess.HorizontalBlur

public class HorizontalBlur extends PostProcessStep
A Post Processing Step that renders the texture with a Horizontal Blur.

NOTE: If you want a more blurry texture, consider using Target.ONE_COLOR_HALF_SIZE_TEXTURE_FRAMEBUFFER to get a smaller framebuffer size and in turn, a more blurrier texture

  • Constructor Details

    • HorizontalBlur

      public HorizontalBlur(PostProcessStep.Target target)
      Default Constructor
      Parameters:
      target - Where the final texture is to be rendered
  • Method Details

    • createShader

      public Shader createShader()
      Create the shader to be used for this step
      Specified by:
      createShader in class PostProcessStep
      Returns:
      the created shader
    • prepare

      public void prepare()
      Prepare the framebuffer by clearing it and binding any textures required
      Specified by:
      prepare in class PostProcessStep
    • uploadUniforms

      protected void uploadUniforms(Shader shader)
      Upload uniforms to the shader
      Specified by:
      uploadUniforms in class PostProcessStep
    • setTexture

      public void setTexture(Texture texture)
      Set the input texture
      Parameters:
      texture - input texture