Class CompositePostPipeline

java.lang.Object
foundry.veil.render.post.stage.CompositePostPipeline
All Implemented Interfaces:
PostPipeline, UniformAccess, AutoCloseable, org.lwjgl.system.NativeResource

public class CompositePostPipeline extends Object implements PostPipeline
A pipeline that runs all child pipelines in order.
  • Field Details

  • Constructor Details

    • CompositePostPipeline

      public CompositePostPipeline(PostPipeline[] stages, Map<String,ShaderTextureSource> textures, Map<net.minecraft.resources.ResourceLocation,FramebufferDefinition> framebufferDefinitions)
      Creates a new composite post pipeline that runs all child pipelines in order.
      Parameters:
      stages - The pipelines to run in order
      textures - The textures to bind globally
      framebufferDefinitions - The definitions of framebuffers to create in order to use in the stages
  • Method Details

    • apply

      public void apply(PostPipeline.Context context)
      Description copied from interface: PostPipeline
      Applies this post effect. PostProcessingManager.runPipeline(PostPipeline) should be called to run this pipeline.
      Specified by:
      apply in interface PostPipeline
      Parameters:
      context - The context to use when running this pipeline.
    • free

      public void free()
      Description copied from interface: PostPipeline
      Allows a post pipeline to dispose of any resources it takes up.
      Specified by:
      free in interface org.lwjgl.system.NativeResource
      Specified by:
      free in interface PostPipeline
    • getType

      Specified by:
      getType in interface PostPipeline
      Returns:
      The type of post effect this is
    • setUniformBlock

      public void setUniformBlock(CharSequence name, int binding)
      Description copied from interface: UniformAccess
      Sets the binding to use for the specified uniform block.
      Specified by:
      setUniformBlock in interface UniformAccess
      Parameters:
      name - The name of the block to set
      binding - The binding to use for that block
    • setFloat

      public void setFloat(CharSequence name, float value)
      Description copied from interface: UniformAccess
      Sets a float in the shader.
      Specified by:
      setFloat in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • setVector

      public void setVector(CharSequence name, float x, float y)
      Description copied from interface: UniformAccess
      Sets a vector in the shader.
      Specified by:
      setVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      x - The x component of the vector
      y - The y component of the vector
    • setVector

      public void setVector(CharSequence name, float x, float y, float z)
      Description copied from interface: UniformAccess
      Sets a vector in the shader.
      Specified by:
      setVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      x - The x component of the vector
      y - The y component of the vector
      z - The z component of the vector
    • setVector

      public void setVector(CharSequence name, float x, float y, float z, float w)
      Description copied from interface: UniformAccess
      Sets a vector in the shader.
      Specified by:
      setVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      x - The x component of the vector
      y - The y component of the vector
      z - The z component of the vector
      w - The w component of the vector
    • setInt

      public void setInt(CharSequence name, int value)
      Description copied from interface: UniformAccess
      Sets an integer in the shader.
      Specified by:
      setInt in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • setVectorI

      public void setVectorI(CharSequence name, int x, int y)
      Description copied from interface: UniformAccess
      Sets an integer vector in the shader.
      Specified by:
      setVectorI in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      x - The x component of the vector
      y - The y component of the vector
    • setVectorI

      public void setVectorI(CharSequence name, int x, int y, int z)
      Description copied from interface: UniformAccess
      Sets an integer vector in the shader.
      Specified by:
      setVectorI in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      x - The x component of the vector
      y - The y component of the vector
      z - The z component of the vector
    • setVectorI

      public void setVectorI(CharSequence name, int x, int y, int z, int w)
      Description copied from interface: UniformAccess
      Sets an integer vector in the shader.
      Specified by:
      setVectorI in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      x - The x component of the vector
      y - The y component of the vector
      z - The z component of the vector
      w - The w component of the vector
    • setFloats

      public void setFloats(CharSequence name, float... values)
      Description copied from interface: UniformAccess
      Sets an array of floats in the shader.
      Specified by:
      setFloats in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setVectors

      public void setVectors(CharSequence name, org.joml.Vector2fc... values)
      Description copied from interface: UniformAccess
      Sets an array of vectors in the shader.
      Specified by:
      setVectors in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setVectors

      public void setVectors(CharSequence name, org.joml.Vector3fc... values)
      Description copied from interface: UniformAccess
      Sets an array of vectors in the shader.
      Specified by:
      setVectors in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setVectors

      public void setVectors(CharSequence name, org.joml.Vector4fc... values)
      Description copied from interface: UniformAccess
      Sets an array of vectors in the shader.
      Specified by:
      setVectors in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setInts

      public void setInts(CharSequence name, int... values)
      Description copied from interface: UniformAccess
      Sets an array of integers in the shader.
      Specified by:
      setInts in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setVectors

      public void setVectors(CharSequence name, org.joml.Vector2ic... values)
      Description copied from interface: UniformAccess
      Sets an array of integer vectors in the shader.
      Specified by:
      setVectors in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setVectors

      public void setVectors(CharSequence name, org.joml.Vector3ic... values)
      Description copied from interface: UniformAccess
      Sets an array of integer vectors in the shader.
      Specified by:
      setVectors in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setVectors

      public void setVectors(CharSequence name, org.joml.Vector4ic... values)
      Description copied from interface: UniformAccess
      Sets an array of integer vectors in the shader.
      Specified by:
      setVectors in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      values - The values to set in order
    • setMatrix

      public void setMatrix(CharSequence name, org.joml.Matrix2fc value)
      Description copied from interface: UniformAccess
      Sets a matrix in the shader.
      Specified by:
      setMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • setMatrix

      public void setMatrix(CharSequence name, org.joml.Matrix3fc value)
      Description copied from interface: UniformAccess
      Sets a matrix in the shader.
      Specified by:
      setMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • setMatrix

      public void setMatrix(CharSequence name, org.joml.Matrix3x2fc value)
      Description copied from interface: UniformAccess
      Sets a matrix in the shader.
      Specified by:
      setMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • setMatrix

      public void setMatrix(CharSequence name, org.joml.Matrix4fc value)
      Description copied from interface: UniformAccess
      Sets a matrix in the shader.
      Specified by:
      setMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • setMatrix

      public void setMatrix(CharSequence name, org.joml.Matrix4x3fc value)
      Description copied from interface: UniformAccess
      Sets a matrix in the shader.
      Specified by:
      setMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • getStages

      public PostPipeline[] getStages()
      Returns:
      The stages run in this pipeline
    • getTextures

      public Map<String,ShaderTextureSource> getTextures()
      Returns:
      The globally bound textures for the child stages to access
    • getFramebuffers

      public Map<net.minecraft.resources.ResourceLocation,FramebufferDefinition> getFramebuffers()
      Returns:
      The framebuffers created for the child stages to access
    • getPriority

      public int getPriority()
      Returns:
      The priority of this pipeline
    • isReplace

      public boolean isReplace()
      Returns:
      Whether this stage will replace all stages with a higher priority