Interface PostPipeline.Context

All Superinterfaces:
ShaderTextureSource.Context
All Known Implementing Classes:
PostPipelineContext
Enclosing interface:
PostPipeline

public static interface PostPipeline.Context extends ShaderTextureSource.Context
Context for applying post pipelines.
  • Method Details

    • setSampler

      void setSampler(CharSequence name, int id)
      Binds a named sampler id. All samplers can be applied with applySamplers(ShaderProgram) for adding them to shaders.
      Parameters:
      name - The name of the sampler
      id - The id of the texture to bind
    • setFramebuffer

      void setFramebuffer(net.minecraft.resources.ResourceLocation name, AdvancedFbo framebuffer)
      Sets a framebuffer to a name. This allows post stages to create new framebuffers that can be accessed later on.
      Parameters:
      name - The name of the framebuffer
      framebuffer - The framebuffer to set
    • applySamplers

      void applySamplers(ShaderProgram shader)
      Applies each sampler to the specified shader.
      Parameters:
      shader - The shader to apply the samplers to
    • getFramebufferOrDraw

      default AdvancedFbo getFramebufferOrDraw(net.minecraft.resources.ResourceLocation name)
      Retrieves a framebuffer by id or the main framebuffer if it doesn't exist.
      Parameters:
      name - The name of the framebuffer to retrieve
      Returns:
      The framebuffer with that id or the main framebuffer
    • getDrawFramebuffer

      AdvancedFbo getDrawFramebuffer()
      Returns:
      The main framebuffer to draw into. This is later copied onto the main framebuffer
    • getPipeline

      @Nullable default @Nullable PostPipeline getPipeline(net.minecraft.resources.ResourceLocation name)
      Retrieves a post pipeline by name.
      Parameters:
      name - The name of the pipeline to get
      Returns:
      The registered pipeline or null if it couldn't be found
    • getShader

      @Nullable default @Nullable ShaderProgram getShader(net.minecraft.resources.ResourceLocation name)
      Retrieves a shader by name.
      Parameters:
      name - The name of the shader to get
      Returns:
      The registered shader or null if it couldn't be found