Interface MutableUniformAccess
- All Superinterfaces:
UniformAccess
- All Known Subinterfaces:
PostPipeline
,ShaderProgram
- All Known Implementing Classes:
BlitPostStage
,CompositePostPipeline
,CopyPostStage
,DepthFunctionPostStage
,FramebufferPostStage
,MaskPostStage
,ShaderProgramImpl
Provides write access to all uniform variables in a shader program.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Sets default uniforms based on whatRenderSystem
provides.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.default void
setVector
(CharSequence name, float[] values) Sets a vector in the shader.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.default void
setVector
(CharSequence name, org.joml.Vector2fc value) Sets a vector in the shader.default void
setVector
(CharSequence name, org.joml.Vector3fc value) Sets a vector in the shader.default void
setVector
(CharSequence name, org.joml.Vector4fc value) 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.default void
setVectorI
(CharSequence name, org.joml.Vector2ic value) Sets an integer vector in the shader.default void
setVectorI
(CharSequence name, org.joml.Vector3ic value) Sets an integer vector in the shader.default void
setVectorI
(CharSequence name, org.joml.Vector4ic value) 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 interface foundry.veil.api.client.render.shader.program.UniformAccess
getFloat, getFloats, getInt, getInts, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getStorageBlock, getUniform, getUniformBlock, getVector, getVector, getVector, getVector, getVector, getVector, hasStorageBlock, hasUniform, hasUniformBlock
-
Method Details
-
applyRenderSystem
default void applyRenderSystem()Sets default uniforms based on whatRenderSystem
provides. -
setUniformBlock
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
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
-
setFloat
Sets a float in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVector
Sets a vector in the shader.- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vector
-
setVector
Sets a vector in the shader.- 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
Sets a vector in the shader.- 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
-
setVector
Sets a vector in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVector
Sets a vector in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVector
Sets a vector in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVector
Sets a vector in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set- Throws:
UnsupportedOperationException
- If the array passed in is empty
-
setInt
Sets an integer in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVectorI
Sets an integer vector in the shader.- Parameters:
name
- The name of the uniform to setx
- The x component of the vectory
- The y component of the vector
-
setVectorI
Sets an integer vector in the shader.- 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
Sets an integer vector in the shader.- 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
-
setVectorI
Sets an integer vector in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVectorI
Sets an integer vector in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setVectorI
Sets an integer vector in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setFloats
Sets an array of floats in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Sets an array of vectors in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Sets an array of vectors in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Sets an array of vectors in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setInts
Sets an array of integers in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Sets an array of integer vectors in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Sets an array of integer vectors in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setVectors
Sets an array of integer vectors in the shader.- Parameters:
name
- The name of the uniform to setvalues
- The values to set in order
-
setMatrix
Sets a matrix in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Sets a matrix in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Sets a matrix in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Sets a matrix in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-
setMatrix
Sets a matrix in the shader.- Parameters:
name
- The name of the uniform to setvalue
- The value to set
-