Package postprocess

Class WeightedCombine

java.lang.Object
postprocess.PostProcessStep
postprocess.WeightedCombine

public class WeightedCombine extends PostProcessStep
A Post Processing Step that combines two textures multiplying them with corresponding weights and then adding them
  • Constructor Details

    • WeightedCombine

      public WeightedCombine(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
    • setTextureA

      public void setTextureA(Texture texture)
      Set the input texture A's id
      Parameters:
      texture - input texture
    • setTextureB

      public void setTextureB(Texture texture)
      Set the input texture B's id
      Parameters:
      texture - input texture
    • setWeightA

      public void setWeightA(float weightA)
      Set the input texture A's weight
      Parameters:
      weightA - input weight
    • setWeightB

      public void setWeightB(float weightB)
      Set the input texture B's weight
      Parameters:
      weightB - input weight