Interface PostPipeline

All Superinterfaces:
AutoCloseable, MutableUniformAccess, org.lwjgl.system.NativeResource, UniformAccess
All Known Implementing Classes:
BlitPostStage, CompositePostPipeline, CopyPostStage, DepthFunctionPostStage, FramebufferPostStage, MaskPostStage

public interface PostPipeline extends MutableUniformAccess, org.lwjgl.system.NativeResource

A series of post-processing effects that can be run to change the current framebuffer state.

It can be fully run using PostProcessingManager.runPipeline(PostPipeline).

This class implements UniformAccess to allow changing uniforms in all shaders.

  • Field Details

    • CODEC

      static final com.mojang.serialization.Codec<PostPipeline> CODEC
  • Method Details

    • apply

      @OverrideOnly void apply(PostPipeline.Context context)
      Applies this post effect. PostProcessingManager.runPipeline(PostPipeline) should be called to run this pipeline.
      Parameters:
      context - The context to use when running this pipeline.
    • free

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

      Returns:
      The type of post effect this is
    • getUniform

      default int getUniform(CharSequence name)
      Description copied from interface: UniformAccess
      Retrieves the location of a uniform.
      Specified by:
      getUniform in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      Returns:
      The location of that uniform or -1 if not found
    • getUniformBlock

      default int getUniformBlock(CharSequence name)
      Description copied from interface: UniformAccess
      Retrieves the location of a uniform block.
      Specified by:
      getUniformBlock in interface UniformAccess
      Parameters:
      name - The name of the uniform block to get
      Returns:
      The location of that uniform block or -1 if not found
    • getStorageBlock

      default int getStorageBlock(CharSequence name)
      Description copied from interface: UniformAccess
      Retrieves the location of a storage block.
      Specified by:
      getStorageBlock in interface UniformAccess
      Parameters:
      name - The name of the storage block to get
      Returns:
      The location of that storage block or -1 if not found
    • hasUniform

      default boolean hasUniform(CharSequence name)
      Description copied from interface: UniformAccess
      Checks if the specified uniform exists in the shader.
      Specified by:
      hasUniform in interface UniformAccess
      Parameters:
      name - The name of the uniform to check
      Returns:
      Whether that uniform can be set
    • hasUniformBlock

      default boolean hasUniformBlock(CharSequence name)
      Description copied from interface: UniformAccess
      Checks if the specified uniform block exists in the shader.
      Specified by:
      hasUniformBlock in interface UniformAccess
      Parameters:
      name - The name of the uniform block to check
      Returns:
      Whether that uniform block can be set
    • hasStorageBlock

      default boolean hasStorageBlock(CharSequence name)
      Description copied from interface: UniformAccess
      Checks if the specified storage block exists in the shader.
      Specified by:
      hasStorageBlock in interface UniformAccess
      Parameters:
      name - The name of the storage block to check
      Returns:
      Whether that storage block can be set
    • getFloat

      default float getFloat(CharSequence name)
      Description copied from interface: UniformAccess
      Retrieves a single float by the specified name.
      Specified by:
      getFloat in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      Returns:
      The float value of that uniform
    • getInt

      default int getInt(CharSequence name)
      Description copied from interface: UniformAccess
      Retrieves a single integer by the specified name.
      Specified by:
      getInt in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      Returns:
      The int value of that uniform
    • getFloats

      default void getFloats(CharSequence name, float[] values)
      Description copied from interface: UniformAccess
      Retrieves an array of floats by the specified name.
      Specified by:
      getFloats in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      default void getVector(CharSequence name, org.joml.Vector2f... values)
      Description copied from interface: UniformAccess
      Retrieves an array of vectors by the specified name.
      Specified by:
      getVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      default void getVector(CharSequence name, org.joml.Vector3f... values)
      Description copied from interface: UniformAccess
      Retrieves an array of vectors by the specified name.
      Specified by:
      getVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      default void getVector(CharSequence name, org.joml.Vector4f... values)
      Description copied from interface: UniformAccess
      Retrieves an array of vectors by the specified name.
      Specified by:
      getVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getInts

      default void getInts(CharSequence name, int[] values)
      Description copied from interface: UniformAccess
      Retrieves an array of integers by the specified name.
      Specified by:
      getInts in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      default void getVector(CharSequence name, org.joml.Vector2i... values)
      Description copied from interface: UniformAccess
      Retrieves an array of vectors by the specified name.
      Specified by:
      getVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      default void getVector(CharSequence name, org.joml.Vector3i... values)
      Description copied from interface: UniformAccess
      Retrieves an array of vectors by the specified name.
      Specified by:
      getVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getVector

      default void getVector(CharSequence name, org.joml.Vector4i... values)
      Description copied from interface: UniformAccess
      Retrieves an array of vectors by the specified name.
      Specified by:
      getVector in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      values - The values to set
    • getMatrix

      default void getMatrix(CharSequence name, org.joml.Matrix2f value)
      Description copied from interface: UniformAccess
      Retrieves a matrix2x2 by the specified name
      Specified by:
      getMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      default void getMatrix(CharSequence name, org.joml.Matrix3f value)
      Description copied from interface: UniformAccess
      Retrieves a matrix3x3 by the specified name
      Specified by:
      getMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      default void getMatrix(CharSequence name, org.joml.Matrix3x2f value)
      Description copied from interface: UniformAccess
      Retrieves a matrix3x2 by the specified name
      Specified by:
      getMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      default void getMatrix(CharSequence name, org.joml.Matrix4f value)
      Description copied from interface: UniformAccess
      Retrieves a matrix4x4 by the specified name
      Specified by:
      getMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • getMatrix

      default void getMatrix(CharSequence name, org.joml.Matrix4x3f value)
      Description copied from interface: UniformAccess
      Retrieves a matrix4x3 by the specified name
      Specified by:
      getMatrix in interface UniformAccess
      Parameters:
      name - The name of the uniform to get
      value - The value to set
    • setUniformBlock

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

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

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

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

      default void setVector(CharSequence name, float x, float y, float z)
      Description copied from interface: MutableUniformAccess
      Sets a vector in the shader.
      Specified by:
      setVector in interface MutableUniformAccess
      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

      default void setVector(CharSequence name, float x, float y, float z, float w)
      Description copied from interface: MutableUniformAccess
      Sets a vector in the shader.
      Specified by:
      setVector in interface MutableUniformAccess
      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

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

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

      default void setVectorI(CharSequence name, int x, int y, int z)
      Description copied from interface: MutableUniformAccess
      Sets an integer vector in the shader.
      Specified by:
      setVectorI in interface MutableUniformAccess
      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

      default void setVectorI(CharSequence name, int x, int y, int z, int w)
      Description copied from interface: MutableUniformAccess
      Sets an integer vector in the shader.
      Specified by:
      setVectorI in interface MutableUniformAccess
      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

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

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

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

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

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

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

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

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

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

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

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

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

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