Package foundry.veil.render.post.stage
Class CompositePostPipeline
java.lang.Object
foundry.veil.render.post.stage.CompositePostPipeline
- All Implemented Interfaces:
PostPipeline,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.render.post.PostPipeline
PostPipeline.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CompositePostPipeline> -
Constructor Summary
ConstructorsConstructorDescriptionCompositePostPipeline(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 TypeMethodDescriptionvoidapply(PostPipeline.Context context) Applies this post effect.voidfree()Allows a post pipeline to dispose of any resources it takes up.Map<net.minecraft.resources.ResourceLocation,FramebufferDefinition> intgetType()booleanvoidsetFloat(CharSequence name, float value) Sets a float in the shader.voidsetFloats(CharSequence name, float... values) Sets an array of floats in the shader.voidsetInt(CharSequence name, int value) Sets an integer in the shader.voidsetInts(CharSequence name, int... values) Sets an array of integers in the shader.voidsetMatrix(CharSequence name, org.joml.Matrix2fc value) Sets a matrix in the shader.voidsetMatrix(CharSequence name, org.joml.Matrix3fc value) Sets a matrix in the shader.voidsetMatrix(CharSequence name, org.joml.Matrix3x2fc value) Sets a matrix in the shader.voidsetMatrix(CharSequence name, org.joml.Matrix4fc value) Sets a matrix in the shader.voidsetMatrix(CharSequence name, org.joml.Matrix4x3fc value) Sets a matrix in the shader.voidsetUniformBlock(CharSequence name, int binding) Sets the binding to use for the specified uniform block.voidsetVector(CharSequence name, float x, float y) Sets a vector in the shader.voidsetVector(CharSequence name, float x, float y, float z) Sets a vector in the shader.voidsetVector(CharSequence name, float x, float y, float z, float w) Sets a vector in the shader.voidsetVectorI(CharSequence name, int x, int y) Sets an integer vector in the shader.voidsetVectorI(CharSequence name, int x, int y, int z) Sets an integer vector in the shader.voidsetVectorI(CharSequence name, int x, int y, int z, int w) Sets an integer vector in the shader.voidsetVectors(CharSequence name, org.joml.Vector2fc... values) Sets an array of vectors in the shader.voidsetVectors(CharSequence name, org.joml.Vector2ic... values) Sets an array of integer vectors in the shader.voidsetVectors(CharSequence name, org.joml.Vector3fc... values) Sets an array of vectors in the shader.voidsetVectors(CharSequence name, org.joml.Vector3ic... values) Sets an array of integer vectors in the shader.voidsetVectors(CharSequence name, org.joml.Vector4fc... values) Sets an array of vectors in the shader.voidsetVectors(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, waitMethods inherited from interface org.lwjgl.system.NativeResource
closeMethods inherited from interface foundry.veil.render.shader.program.UniformAccess
setVector, setVector, setVector, setVectorI, setVectorI, setVectorI
-
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 in order to use in the stages
-
-
Method Details
-
apply
Description copied from interface:PostPipelineApplies this post effect.PostProcessingManager.runPipeline(PostPipeline)should be called to run this pipeline.- Specified by:
applyin interfacePostPipeline- Parameters:
context- The context to use when running this pipeline.
-
free
public void free()Description copied from interface:PostPipelineAllows a post pipeline to dispose of any resources it takes up.- Specified by:
freein interfaceorg.lwjgl.system.NativeResource- Specified by:
freein interfacePostPipeline
-
getType
- Specified by:
getTypein interfacePostPipeline- Returns:
- The type of post effect this is
-
setUniformBlock
Description copied from interface:UniformAccessSets the binding to use for the specified uniform block.- Specified by:
setUniformBlockin interfaceUniformAccess- Parameters:
name- The name of the block to setbinding- The binding to use for that block
-
setFloat
Description copied from interface:UniformAccessSets a float in the shader.- Specified by:
setFloatin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalue- The value to set
-
setVector
Description copied from interface:UniformAccessSets a vector in the shader.- Specified by:
setVectorin interfaceUniformAccess- 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:UniformAccessSets a vector in the shader.- Specified by:
setVectorin interfaceUniformAccess- 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:UniformAccessSets a vector in the shader.- Specified by:
setVectorin interfaceUniformAccess- 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:UniformAccessSets an integer in the shader.- Specified by:
setIntin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalue- The value to set
-
setVectorI
Description copied from interface:UniformAccessSets an integer vector in the shader.- Specified by:
setVectorIin interfaceUniformAccess- 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:UniformAccessSets an integer vector in the shader.- Specified by:
setVectorIin interfaceUniformAccess- 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:UniformAccessSets an integer vector in the shader.- Specified by:
setVectorIin interfaceUniformAccess- 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:UniformAccessSets an array of floats in the shader.- Specified by:
setFloatsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setVectors
Description copied from interface:UniformAccessSets an array of vectors in the shader.- Specified by:
setVectorsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setVectors
Description copied from interface:UniformAccessSets an array of vectors in the shader.- Specified by:
setVectorsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setVectors
Description copied from interface:UniformAccessSets an array of vectors in the shader.- Specified by:
setVectorsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setInts
Description copied from interface:UniformAccessSets an array of integers in the shader.- Specified by:
setIntsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setVectors
Description copied from interface:UniformAccessSets an array of integer vectors in the shader.- Specified by:
setVectorsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setVectors
Description copied from interface:UniformAccessSets an array of integer vectors in the shader.- Specified by:
setVectorsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setVectors
Description copied from interface:UniformAccessSets an array of integer vectors in the shader.- Specified by:
setVectorsin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalues- The values to set in order
-
setMatrix
Description copied from interface:UniformAccessSets a matrix in the shader.- Specified by:
setMatrixin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalue- The value to set
-
setMatrix
Description copied from interface:UniformAccessSets a matrix in the shader.- Specified by:
setMatrixin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalue- The value to set
-
setMatrix
Description copied from interface:UniformAccessSets a matrix in the shader.- Specified by:
setMatrixin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalue- The value to set
-
setMatrix
Description copied from interface:UniformAccessSets a matrix in the shader.- Specified by:
setMatrixin interfaceUniformAccess- Parameters:
name- The name of the uniform to setvalue- The value to set
-
setMatrix
Description copied from interface:UniformAccessSets a matrix in the shader.- Specified by:
setMatrixin interfaceUniformAccess- 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
-