Class CompositePostPipeline
java.lang.Object
foundry.veil.api.client.render.post.stage.CompositePostPipeline
- All Implemented Interfaces:
PostPipeline
,MutableUniformAccess
,UniformAccess
,AutoCloseable
,org.lwjgl.system.NativeResource
A pipeline that runs all child pipelines in order.
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.post.PostPipeline
PostPipeline.Context
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CompositePostPipeline>
-
Constructor Summary
ConstructorDescriptionCompositePostPipeline
(PostPipeline[] stages, Map<String, ShaderTextureSource> textures, Map<net.minecraft.resources.ResourceLocation, FramebufferDefinition> framebufferDefinitions) Creates a new composite post pipeline that runs all child pipelines in order. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(PostPipeline.Context context) Applies this post effect.void
free()
Allows a post pipeline to dispose of any resources it takes up.Map<net.minecraft.resources.ResourceLocation,
FramebufferDefinition> int
getType()
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.boolean
void
setFloat
(CharSequence name, float value) Sets a float in the shader.void
setFloats
(CharSequence name, float... values) Sets an array of floats in the shader.void
setInt
(CharSequence name, int value) Sets an integer in the shader.void
setInts
(CharSequence name, int... values) Sets an array of integers in the shader.void
setMatrix
(CharSequence name, org.joml.Matrix2fc value) Sets a matrix in the shader.void
setMatrix
(CharSequence name, org.joml.Matrix3fc value) Sets a matrix in the shader.void
setMatrix
(CharSequence name, org.joml.Matrix3x2fc value) Sets a matrix in the shader.void
setMatrix
(CharSequence name, org.joml.Matrix4fc value) Sets a matrix in the shader.void
setMatrix
(CharSequence name, org.joml.Matrix4x3fc value) Sets a matrix 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.void
setVector
(CharSequence name, float x, float y) Sets a vector in the shader.void
setVector
(CharSequence name, float x, float y, float z) Sets a vector in the shader.void
setVector
(CharSequence name, float x, float y, float z, float w) Sets a vector in the shader.void
setVectorI
(CharSequence name, int x, int y) Sets an integer vector in the shader.void
setVectorI
(CharSequence name, int x, int y, int z) Sets an integer vector in the shader.void
setVectorI
(CharSequence name, int x, int y, int z, int w) Sets an integer vector in the shader.void
setVectors
(CharSequence name, org.joml.Vector2fc... values) Sets an array of vectors in the shader.void
setVectors
(CharSequence name, org.joml.Vector2ic... values) Sets an array of integer vectors in the shader.void
setVectors
(CharSequence name, org.joml.Vector3fc... values) Sets an array of vectors in the shader.void
setVectors
(CharSequence name, org.joml.Vector3ic... values) Sets an array of integer vectors in the shader.void
setVectors
(CharSequence name, org.joml.Vector4fc... values) Sets an array of vectors in the shader.void
setVectors
(CharSequence name, org.joml.Vector4ic... values) Sets an array of integer vectors in the shader.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
getFloat, getFloats, getInt, getInts, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getStorageBlock, getUniform, getUniformBlock, getVector, getVector, getVector, getVector, getVector, getVector
-
Field Details
-
CODEC
-
-
Constructor Details
-
CompositePostPipeline
public CompositePostPipeline(PostPipeline[] stages, Map<String, ShaderTextureSource> textures, Map<net.minecraft.resources.ResourceLocation, FramebufferDefinition> framebufferDefinitions) Creates a new composite post pipeline that runs all child pipelines in order.- Parameters:
stages
- The pipelines to run in ordertextures
- The textures to bind globallyframebufferDefinitions
- The definitions of framebuffers to create for use in the stages
-
-
Method Details
-
apply
Description copied from interface:PostPipeline
Applies this post effect.PostProcessingManager.runPipeline(PostPipeline)
should be called to run this pipeline.- Specified by:
apply
in interfacePostPipeline
- Parameters:
context
- The context to use when running this pipeline.
-
free
public void free()Description copied from interface:PostPipeline
Allows a post pipeline to dispose of any resources it takes up.- Specified by:
free
in interfaceorg.lwjgl.system.NativeResource
- Specified by:
free
in interfacePostPipeline
-
getType
- Specified by:
getType
in interfacePostPipeline
- Returns:
- The type of post effect this is
-
hasUniform
Description copied from interface:UniformAccess
Checks if the specified uniform exists in the shader.- Specified by:
hasUniform
in interfacePostPipeline
- Specified by:
hasUniform
in interfaceUniformAccess
- Parameters:
name
- The name of the uniform to check- Returns:
- Whether that uniform can be set
-
hasUniformBlock
Description copied from interface:UniformAccess
Checks if the specified uniform block exists in the shader.- Specified by:
hasUniformBlock
in interfacePostPipeline
- Specified by:
hasUniformBlock
in interfaceUniformAccess
- 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.- Specified by:
hasStorageBlock
in interfacePostPipeline
- Specified by:
hasStorageBlock
in interfaceUniformAccess
- 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.- Specified by:
setUniformBlock
in interfaceMutableUniformAccess
- Specified by:
setUniformBlock
in interfacePostPipeline
- 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.- Specified by:
setStorageBlock
in interfaceMutableUniformAccess
- Specified by:
setStorageBlock
in interfacePostPipeline
- Parameters:
name
- The name of the block to setbinding
- The binding to use for that block
-
setFloat
Description copied from interface:MutableUniformAccess
Sets a float in the shader.- Specified by:
setFloat
in interfaceMutableUniformAccess
- Specified by:
setFloat
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVector
Description copied from interface:MutableUniformAccess
Sets a vector in the shader.- Specified by:
setVector
in interfaceMutableUniformAccess
- Specified by:
setVector
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vector
-
setVector
Description copied from interface:MutableUniformAccess
Sets a vector in the shader.- Specified by:
setVector
in interfaceMutableUniformAccess
- Specified by:
setVector
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vectorz
- The z component of the vector
-
setVector
Description copied from interface:MutableUniformAccess
Sets a vector in the shader.- Specified by:
setVector
in interfaceMutableUniformAccess
- Specified by:
setVector
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vectorz
- The z component of the vectorw
- The w component of the vector
-
setInt
Description copied from interface:MutableUniformAccess
Sets an integer in the shader.- Specified by:
setInt
in interfaceMutableUniformAccess
- Specified by:
setInt
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVectorI
Description copied from interface:MutableUniformAccess
Sets an integer vector in the shader.- Specified by:
setVectorI
in interfaceMutableUniformAccess
- Specified by:
setVectorI
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vector
-
setVectorI
Description copied from interface:MutableUniformAccess
Sets an integer vector in the shader.- Specified by:
setVectorI
in interfaceMutableUniformAccess
- Specified by:
setVectorI
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vectorz
- The z component of the vector
-
setVectorI
Description copied from interface:MutableUniformAccess
Sets an integer vector in the shader.- Specified by:
setVectorI
in interfaceMutableUniformAccess
- Specified by:
setVectorI
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vectorz
- The z component of the vectorw
- The w component of the vector
-
setFloats
Description copied from interface:MutableUniformAccess
Sets an array of floats in the shader.- Specified by:
setFloats
in interfaceMutableUniformAccess
- Specified by:
setFloats
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Description copied from interface:MutableUniformAccess
Sets an array of vectors in the shader.- Specified by:
setVectors
in interfaceMutableUniformAccess
- Specified by:
setVectors
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Description copied from interface:MutableUniformAccess
Sets an array of vectors in the shader.- Specified by:
setVectors
in interfaceMutableUniformAccess
- Specified by:
setVectors
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Description copied from interface:MutableUniformAccess
Sets an array of vectors in the shader.- Specified by:
setVectors
in interfaceMutableUniformAccess
- Specified by:
setVectors
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setInts
Description copied from interface:MutableUniformAccess
Sets an array of integers in the shader.- Specified by:
setInts
in interfaceMutableUniformAccess
- Specified by:
setInts
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Description copied from interface:MutableUniformAccess
Sets an array of integer vectors in the shader.- Specified by:
setVectors
in interfaceMutableUniformAccess
- Specified by:
setVectors
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Description copied from interface:MutableUniformAccess
Sets an array of integer vectors in the shader.- Specified by:
setVectors
in interfaceMutableUniformAccess
- Specified by:
setVectors
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Description copied from interface:MutableUniformAccess
Sets an array of integer vectors in the shader.- Specified by:
setVectors
in interfaceMutableUniformAccess
- Specified by:
setVectors
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setMatrix
Description copied from interface:MutableUniformAccess
Sets a matrix in the shader.- Specified by:
setMatrix
in interfaceMutableUniformAccess
- Specified by:
setMatrix
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Description copied from interface:MutableUniformAccess
Sets a matrix in the shader.- Specified by:
setMatrix
in interfaceMutableUniformAccess
- Specified by:
setMatrix
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Description copied from interface:MutableUniformAccess
Sets a matrix in the shader.- Specified by:
setMatrix
in interfaceMutableUniformAccess
- Specified by:
setMatrix
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Description copied from interface:MutableUniformAccess
Sets a matrix in the shader.- Specified by:
setMatrix
in interfaceMutableUniformAccess
- Specified by:
setMatrix
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Description copied from interface:MutableUniformAccess
Sets a matrix in the shader.- Specified by:
setMatrix
in interfaceMutableUniformAccess
- Specified by:
setMatrix
in interfacePostPipeline
- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
getStages
- Returns:
- The stages run in this pipeline
-
getTextures
- Returns:
- The globally bound textures for the child stages to access
-
getFramebuffers
- Returns:
- The framebuffers created for the child stages to access
-
getPriority
public int getPriority()- Returns:
- The priority of this pipeline
-
isReplace
public boolean isReplace()- Returns:
- Whether this stage will replace all stages with a higher priority
-