Class BlitPostStage

java.lang.Object
foundry.veil.api.client.render.post.stage.FramebufferPostStage
foundry.veil.api.client.render.post.stage.BlitPostStage
All Implemented Interfaces:
PostPipeline, MutableUniformAccess, UniformAccess, AutoCloseable, org.lwjgl.system.NativeResource

public class BlitPostStage extends FramebufferPostStage
A basic stage that draws a quad to the output using a specified shader.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<BlitPostStage> CODEC
  • Constructor Details

    • BlitPostStage

      public BlitPostStage(net.minecraft.resources.ResourceLocation shader, @Nullable @Nullable net.minecraft.resources.ResourceLocation in, net.minecraft.resources.ResourceLocation out, boolean clear)
      Creates a new blit post stage that applies the specified shader.
      Parameters:
      shader - The shader to apply
      in - The framebuffer to use as DiffuseSampler0-DiffuseSampler7 and DiffuseDepthSampler
      out - The framebuffer to write into
      clear - Whether to clear the output before drawing
  • 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.
      Parameters:
      context - The context to use when running this pipeline.
    • getType

      Returns:
      The type of post effect this is
    • hasUniform

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

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

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

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

      public void setStorageBlock(CharSequence name, int binding)
      Description copied from interface: MutableUniformAccess
      Sets the binding to use for the specified storage block.
      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: MutableUniformAccess
      Sets a float in the shader.
      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: MutableUniformAccess
      Sets a vector in the shader.
      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: MutableUniformAccess
      Sets a vector in the shader.
      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: MutableUniformAccess
      Sets a vector in the shader.
      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: MutableUniformAccess
      Sets an integer in the shader.
      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: MutableUniformAccess
      Sets an integer vector in the shader.
      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: MutableUniformAccess
      Sets an integer vector in the shader.
      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: MutableUniformAccess
      Sets an integer vector in the shader.
      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: MutableUniformAccess
      Sets an array of floats in the shader.
      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: MutableUniformAccess
      Sets an array of vectors in the shader.
      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: MutableUniformAccess
      Sets an array of vectors in the shader.
      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: MutableUniformAccess
      Sets an array of vectors in the shader.
      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: MutableUniformAccess
      Sets an array of integers in the shader.
      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: MutableUniformAccess
      Sets an array of integer vectors in the shader.
      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: MutableUniformAccess
      Sets an array of integer vectors in the shader.
      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: MutableUniformAccess
      Sets an array of integer vectors in the shader.
      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: MutableUniformAccess
      Sets a matrix in the shader.
      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: MutableUniformAccess
      Sets a matrix in the shader.
      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: MutableUniformAccess
      Sets a matrix in the shader.
      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: MutableUniformAccess
      Sets a matrix in the shader.
      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: MutableUniformAccess
      Sets a matrix in the shader.
      Parameters:
      name - The name of the uniform to set
      value - The value to set
    • getShader

      @Nullable public @Nullable ShaderProgram getShader()
      Returns:
      The shader this stage should use
    • getShaderId

      public net.minecraft.resources.ResourceLocation getShaderId()
      Returns:
      The name of the shader this stage should use