Package postprocess

Class ForwardToTexture

java.lang.Object
postprocess.PostProcessStep
postprocess.ForwardToTexture

public class ForwardToTexture extends PostProcessStep
A Post Processing Step that renders the texture as-is to another framebuffer. Perfect for debugging steps.

NOTE: If you want to forward any texture to the screen, the scene class has a forwardToScreen field that can be used

  • Constructor Details

    • ForwardToTexture

      public ForwardToTexture(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