Class BlitPostStage
java.lang.Object
foundry.veil.api.client.render.post.stage.FramebufferPostStage
foundry.veil.api.client.render.post.stage.BlitPostStage
- All Implemented Interfaces:
PostPipeline
,MutableUniformAccess
,UniformAccess
,AutoCloseable
,org.lwjgl.system.NativeResource
A basic stage that draws a quad to the output using a specified shader.
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.post.PostPipeline
PostPipeline.Context
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlitPostStage
(net.minecraft.resources.ResourceLocation shader, Map<String, UniformValue> uniforms, @Nullable net.minecraft.resources.ResourceLocation in, net.minecraft.resources.ResourceLocation out, boolean clear) Creates a new blit post stage that applies the specified shader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(PostPipeline.Context context) Applies this post effect.Retrieves a uniform by name or creates a reference to one that may exist in the future.@Nullable ShaderProgram
net.minecraft.resources.ResourceLocation
getType()
@Nullable ShaderUniformAccess
getUniform
(CharSequence name) Retrieves a uniform by name.getUniformSafe
(CharSequence name) Retrieves a uniform by name.boolean
hasStorageBlock
(CharSequence name) Checks if the specified storage block exists in the shader.boolean
hasUniform
(CharSequence name) Checks if the specified uniform exists in the shader.boolean
hasUniformBlock
(CharSequence name) Checks if the specified uniform block exists in the shader.void
setStorageBlock
(CharSequence name, int binding) Sets the binding to use for the specified storage block.void
setUniformBlock
(CharSequence name, int binding) Sets the binding to use for the specified uniform block.Methods inherited from class foundry.veil.api.client.render.post.stage.FramebufferPostStage
clearOut, getIn, getOut, setupFramebuffer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.lwjgl.system.NativeResource
close
Methods inherited from interface foundry.veil.api.client.render.post.PostPipeline
free, getStorageBlock, getUniformBlock, getUniformLocation
-
Field Details
-
CODEC
-
-
Constructor Details
-
BlitPostStage
public BlitPostStage(net.minecraft.resources.ResourceLocation shader, Map<String, UniformValue> uniforms, @Nullable @Nullable net.minecraft.resources.ResourceLocation in, net.minecraft.resources.ResourceLocation out, boolean clear) Creates a new blit post stage that applies the specified shader.- Parameters:
shader
- The shader to applyin
- The framebuffer to use asDiffuseSampler0
-DiffuseSampler7
andDiffuseDepthSampler
out
- The framebuffer to write intoclear
- Whether to clear the output before drawing
-
-
Method Details
-
apply
Description copied from interface:PostPipeline
Applies this post effect.PostProcessingManager.runPipeline(PostPipeline)
should be called to run this pipeline.- Parameters:
context
- The context to use when running this pipeline.
-
getType
- Returns:
- The type of post effect this is
-
hasUniform
Description copied from interface:UniformAccess
Checks if the specified uniform exists in the shader.- Parameters:
name
- The name of the uniform to check- Returns:
- Whether that uniform can be set
-
getUniform
Description copied from interface:UniformAccess
Retrieves a uniform by name.- Parameters:
name
- The name of the uniform to get- Returns:
- The uniform with that name or
null
if the uniform does not exist
-
getUniformSafe
Description copied from interface:UniformAccess
Retrieves a uniform by name.- Parameters:
name
- The name of the uniform to get- Returns:
- The uniform with that name
-
getOrCreateUniform
Description copied from interface:UniformAccess
Retrieves a uniform by name or creates a reference to one that may exist in the future.- Parameters:
name
- The name of the uniform to get- Returns:
- The uniform instance
-
hasUniformBlock
Description copied from interface:UniformAccess
Checks if the specified uniform block exists in the shader.- Parameters:
name
- The name of the uniform block to check- Returns:
- Whether that uniform block can be set
-
hasStorageBlock
Description copied from interface:UniformAccess
Checks if the specified storage block exists in the shader.- Parameters:
name
- The name of the storage block to check- Returns:
- Whether that storage block can be set
-
setUniformBlock
Description copied from interface:MutableUniformAccess
Sets the binding to use for the specified uniform block.- Parameters:
name
- The name of the block to setbinding
- The binding to use for that block
-
setStorageBlock
Description copied from interface:MutableUniformAccess
Sets the binding to use for the specified storage block.- Parameters:
name
- The name of the block to setbinding
- The binding to use for that block
-
getShader
- Returns:
- The shader this stage should use
-
getShaderId
public net.minecraft.resources.ResourceLocation getShaderId()- Returns:
- The name of the shader this stage should use
-
getUniforms
- Returns:
- A view of all uniform values set by this stage
-