Class PostPipelineContext

java.lang.Object
foundry.veil.impl.client.render.pipeline.PostPipelineContext
All Implemented Interfaces:
PostPipeline.Context, ShaderTextureSource.Context

@Internal public class PostPipelineContext extends Object implements PostPipeline.Context
Default implementation of PostPipeline.Context.
  • Constructor Details

    • PostPipelineContext

      public PostPipelineContext()
      Creates a new context to fit the specified window.
  • Method Details

    • begin

      public void begin()
      Marks the start of a new post run.
    • end

      public void end()
      Ends the running pass and cleans up resources.
    • setSampler

      public void setSampler(CharSequence name, int id)
      Description copied from interface: PostPipeline.Context
      Binds a named sampler id. All samplers can be applied with PostPipeline.Context.applySamplers(ShaderProgram) for adding them to shaders.
      Specified by:
      setSampler in interface PostPipeline.Context
      Parameters:
      name - The name of the sampler
      id - The id of the texture to bind
    • setFramebuffer

      public void setFramebuffer(net.minecraft.resources.ResourceLocation name, AdvancedFbo framebuffer)
      Description copied from interface: PostPipeline.Context
      Sets a framebuffer to a name. This allows post stages to create new framebuffers that can be accessed later on.
      Specified by:
      setFramebuffer in interface PostPipeline.Context
      Parameters:
      name - The name of the framebuffer
      framebuffer - The framebuffer to set
    • applySamplers

      public void applySamplers(ShaderProgram shader)
      Description copied from interface: PostPipeline.Context
      Applies each sampler to the specified shader.
      Specified by:
      applySamplers in interface PostPipeline.Context
      Parameters:
      shader - The shader to apply the samplers to
    • getFramebuffer

      @Nullable public @Nullable AdvancedFbo getFramebuffer(net.minecraft.resources.ResourceLocation name)
      Description copied from interface: ShaderTextureSource.Context
      Retrieves a framebuffer by id.
      Specified by:
      getFramebuffer in interface ShaderTextureSource.Context
      Parameters:
      name - The name of the framebuffer to retrieve
      Returns:
      The framebuffer with that id or null if it was not found
    • getDrawFramebuffer

      public AdvancedFbo getDrawFramebuffer()
      Specified by:
      getDrawFramebuffer in interface PostPipeline.Context
      Returns:
      The main framebuffer to draw into. This is later copied onto the main framebuffer