Class FramebufferPostStage

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

public abstract class FramebufferPostStage extends Object implements PostPipeline
An abstract stage that uses a framebuffer as the input and output.
  • Constructor Details

    • FramebufferPostStage

      public FramebufferPostStage(@Nullable @Nullable net.minecraft.resources.ResourceLocation in, net.minecraft.resources.ResourceLocation out, boolean clear)
      Creates a post stage with the specified input and output framebuffers.
      Parameters:
      in - The framebuffer to use as DiffuseSampler0-DiffuseSampler...max and DiffuseDepthSampler
      out - The framebuffer to write into
      clear - Whether to clear the output before drawing
  • Method Details

    • setupFramebuffer

      protected void setupFramebuffer(PostPipeline.Context context, ShaderProgram shader)
      Applies the input framebuffer textures and binds the output framebuffer.
      Parameters:
      context - The context for post-processing
      shader - The shader to set input samplers to
    • getIn

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation getIn()
      Returns:
      The framebuffer to read from
    • getOut

      public net.minecraft.resources.ResourceLocation getOut()
      Returns:
      The framebuffer to write into
    • clearOut

      public boolean clearOut()
      Returns:
      Whether the output should be cleared before drawing