Class FramebufferPostStage
java.lang.Object
foundry.veil.api.client.render.post.stage.FramebufferPostStage
- All Implemented Interfaces:
PostPipeline
,MutableUniformAccess
,UniformAccess
,AutoCloseable
,org.lwjgl.system.NativeResource
- Direct Known Subclasses:
BlitPostStage
,CopyPostStage
An abstract stage that uses a framebuffer as the input and output.
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.post.PostPipeline
PostPipeline.Context
-
Field Summary
Fields inherited from interface foundry.veil.api.client.render.post.PostPipeline
CODEC
-
Constructor Summary
ConstructorDescriptionFramebufferPostStage
(@Nullable net.minecraft.resources.ResourceLocation in, net.minecraft.resources.ResourceLocation out, boolean clear) Creates a post stage with the specified input and output framebuffers. -
Method Summary
Modifier and TypeMethodDescriptionboolean
clearOut()
@Nullable net.minecraft.resources.ResourceLocation
getIn()
net.minecraft.resources.ResourceLocation
getOut()
protected void
setupFramebuffer
(PostPipeline.Context context, ShaderProgram shader) Applies the input framebuffer textures and binds the output framebuffer.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.shader.program.MutableUniformAccess
applyRenderSystem, setVector, setVector, setVector, setVector, setVectorI, setVectorI, setVectorI
Methods inherited from interface org.lwjgl.system.NativeResource
close
Methods inherited from interface foundry.veil.api.client.render.post.PostPipeline
apply, free, getFloat, getFloats, getInt, getInts, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getStorageBlock, getType, getUniform, getUniformBlock, getVector, getVector, getVector, getVector, getVector, getVector, hasStorageBlock, hasUniform, hasUniformBlock, setFloat, setFloats, setInt, setInts, setMatrix, setMatrix, setMatrix, setMatrix, setMatrix, setStorageBlock, setUniformBlock, setVector, setVector, setVector, setVectorI, setVectorI, setVectorI, setVectors, setVectors, setVectors, setVectors, setVectors, setVectors
-
Constructor Details
-
FramebufferPostStage
public FramebufferPostStage(@Nullable @Nullable net.minecraft.resources.ResourceLocation in, net.minecraft.resources.ResourceLocation out, boolean clear) Creates a post stage with the specified input and output framebuffers.- Parameters:
in
- The framebuffer to use asDiffuseSampler0
-DiffuseSampler...max
andDiffuseDepthSampler
out
- The framebuffer to write intoclear
- Whether to clear the output before drawing
-
-
Method Details
-
setupFramebuffer
Applies the input framebuffer textures and binds the output framebuffer.- Parameters:
context
- The context for post-processingshader
- The shader to set input samplers to
-
getIn
@Nullable public @Nullable net.minecraft.resources.ResourceLocation getIn()- Returns:
- The framebuffer to read from
-
getOut
public net.minecraft.resources.ResourceLocation getOut()- Returns:
- The framebuffer to write into
-
clearOut
public boolean clearOut()- Returns:
- Whether the output should be cleared before drawing
-