Class PostPipelineContext
java.lang.Object
foundry.veil.impl.client.render.pipeline.PostPipelineContext
- All Implemented Interfaces:
PostPipeline.Context
,ShaderTextureSource.Context
Default implementation of
PostPipeline.Context
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applySamplers
(ShaderProgram shader) Applies each sampler to the specified shader.void
begin()
Marks the start of a new post run.void
end()
Ends the running pass and cleans up resources.@Nullable AdvancedFbo
getFramebuffer
(net.minecraft.resources.ResourceLocation name) Retrieves a framebuffer by id.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface foundry.veil.api.client.render.post.PostPipeline.Context
getFramebufferOrDraw, getPipeline, getShader
Methods inherited from interface foundry.veil.api.client.render.shader.texture.ShaderTextureSource.Context
getTexture
-
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
Description copied from interface:PostPipeline.Context
Binds a named sampler id. All samplers can be applied withPostPipeline.Context.applySamplers(ShaderProgram)
for adding them to shaders.- Specified by:
setSampler
in interfacePostPipeline.Context
- Parameters:
name
- The name of the samplerid
- The id of the texture to bind
-
setFramebuffer
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 interfacePostPipeline.Context
- Parameters:
name
- The name of the framebufferframebuffer
- The framebuffer to set
-
applySamplers
Description copied from interface:PostPipeline.Context
Applies each sampler to the specified shader.- Specified by:
applySamplers
in interfacePostPipeline.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 interfaceShaderTextureSource.Context
- Parameters:
name
- The name of the framebuffer to retrieve- Returns:
- The framebuffer with that id or
null
if it was not found
-
getDrawFramebuffer
- Specified by:
getDrawFramebuffer
in interfacePostPipeline.Context
- Returns:
- The main framebuffer to draw into. This is later copied onto the main framebuffer
-