Interface PostPipeline.Context
- All Superinterfaces:
ShaderTextureSource.Context
- All Known Implementing Classes:
PostPipelineContext
- Enclosing interface:
PostPipeline
Context for applying post pipelines.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applySamplers
(ShaderProgram shader) Applies each sampler to the specified shader.default AdvancedFbo
getFramebufferOrDraw
(net.minecraft.resources.ResourceLocation name) Retrieves a framebuffer by id or the main framebuffer if it doesn't exist.default @Nullable PostPipeline
getPipeline
(net.minecraft.resources.ResourceLocation name) Retrieves a post pipeline by name.default @Nullable ShaderProgram
getShader
(net.minecraft.resources.ResourceLocation name) Retrieves a shader by name.void
setFramebuffer
(net.minecraft.resources.ResourceLocation name, AdvancedFbo framebuffer) Sets a framebuffer to a name.void
setSampler
(CharSequence name, int id) Binds a named sampler id.Methods inherited from interface foundry.veil.api.client.render.shader.texture.ShaderTextureSource.Context
getFramebuffer, getTexture
-
Method Details
-
setSampler
Binds a named sampler id. All samplers can be applied withapplySamplers(ShaderProgram)
for adding them to shaders.- Parameters:
name
- The name of the samplerid
- The id of the texture to bind
-
setFramebuffer
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 framebufferframebuffer
- The framebuffer to set
-
applySamplers
Applies each sampler to the specified shader.- Parameters:
shader
- The shader to apply the samplers to
-
getFramebufferOrDraw
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
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
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
-