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

    • drawScreenQuad

      void drawScreenQuad()
      Draws a quad onto the full screen using DefaultVertexFormat.POSITION.
    • 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
    • getTexture

      default net.minecraft.client.renderer.texture.AbstractTexture getTexture(net.minecraft.resources.ResourceLocation name)
      Description copied from interface: ShaderTextureSource.Context
      Retrieves a texture by id.
      Specified by:
      getTexture in interface ShaderTextureSource.Context
      Parameters:
      name - The name of the texture to retrieve
      Returns:
      The texture with that id or the missing texture if it was not found