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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplySamplers(TextureUniformAccess shader) Applies each sampler to the specified shader.voidbegin()Marks the start of a new post run.voidclearSamplers(TextureUniformAccess shader) Removes all post-processing samplers from the specified shader.voidend()Ends the running pass and cleans up resources.@Nullable AdvancedFbogetFramebuffer(net.minecraft.resources.ResourceLocation name) Retrieves a framebuffer by id.voidsetFramebuffer(net.minecraft.resources.ResourceLocation name, AdvancedFbo framebuffer) Sets a framebuffer to a name.voidsetSampler(CharSequence name, int textureId, int samplerId) Binds a named sampler id.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface foundry.veil.api.client.render.post.PostPipeline.Context
getFramebufferOrDraw, getPipeline, getShaderMethods 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.ContextBinds a named sampler id. All samplers can be applied withPostPipeline.Context.applySamplers(TextureUniformAccess)for adding them to shaders.- Specified by:
setSamplerin interfacePostPipeline.Context- Parameters:
name- The name of the samplertextureId- The id of the texture to bindsamplerId- The id of the sampler to bind
-
setFramebuffer
Description copied from interface:PostPipeline.ContextSets a framebuffer to a name. This allows post stages to create new framebuffers that can be accessed later on.- Specified by:
setFramebufferin interfacePostPipeline.Context- Parameters:
name- The name of the framebufferframebuffer- The framebuffer to set
-
applySamplers
Description copied from interface:PostPipeline.ContextApplies each sampler to the specified shader.- Specified by:
applySamplersin interfacePostPipeline.Context- Parameters:
shader- The shader to apply the samplers to
-
clearSamplers
Description copied from interface:PostPipeline.ContextRemoves all post-processing samplers from the specified shader.- Specified by:
clearSamplersin 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.ContextRetrieves a framebuffer by id.- Specified by:
getFramebufferin interfaceShaderTextureSource.Context- Parameters:
name- The name of the framebuffer to retrieve- Returns:
- The framebuffer with that id or
nullif it was not found
-
getDrawFramebuffer
- Specified by:
getDrawFramebufferin interfacePostPipeline.Context- Returns:
- The main framebuffer to draw into. This is later copied onto the main framebuffer
-