Package dev.cammiescorner.velvet.impl
Class ManagedUniform
java.lang.Object
dev.cammiescorner.velvet.impl.ManagedUniformBase
dev.cammiescorner.velvet.impl.ManagedUniform
- All Implemented Interfaces:
Uniform1f,Uniform1i,Uniform2f,Uniform2i,Uniform3f,Uniform3i,Uniform4f,Uniform4i,UniformMat4
public final class ManagedUniform
extends ManagedUniformBase
implements Uniform1i, Uniform2i, Uniform3i, Uniform4i, Uniform1f, Uniform2f, Uniform3f, Uniform4f, UniformMat4
-
Field Summary
Fields inherited from class dev.cammiescorner.velvet.impl.ManagedUniformBase
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfindUniformTarget(net.minecraft.client.renderer.ShaderInstance shader) booleanfindUniformTargets(List<net.minecraft.client.renderer.PostPass> shaders) voidset(float value) Sets the value of a uniformvoidset(float value0, float value1) Sets the value of a uniform declared in jsonvoidset(float value0, float value1, float value2) Sets the value of a uniform declared in jsonvoidset(float value0, float value1, float value2, float value3) Sets the value of a uniform declared in jsonvoidset(int value) Sets the value of this uniformvoidset(int value0, int value1) Sets the value of a uniformvoidset(int value0, int value1, int value2) Sets the value of a uniformvoidset(int value0, int value1, int value2, int value3) Sets the value of a uniform declared in jsonvoidset(org.joml.Matrix4f value) Sets the value of a 4x4 matrix uniformvoidset(org.joml.Vector2f value) Sets the value of a uniform declared in jsonvoidset(org.joml.Vector3f value) Sets the value of a uniform declared in jsonvoidset(org.joml.Vector4f value) Sets the value of a uniform declared in jsonvoidsetFromArray(float[] values) Sets the value of a 4x4 matrix uniform through a float arrayMethods inherited from class dev.cammiescorner.velvet.impl.ManagedUniformBase
getName
-
Constructor Details
-
ManagedUniform
-
-
Method Details
-
findUniformTargets
- Specified by:
findUniformTargetsin classManagedUniformBase
-
findUniformTarget
public boolean findUniformTarget(net.minecraft.client.renderer.ShaderInstance shader) - Specified by:
findUniformTargetin classManagedUniformBase
-
set
public void set(int value) Description copied from interface:Uniform1iSets the value of this uniform -
set
public void set(int value0, int value1) Description copied from interface:Uniform2iSets the value of a uniform -
set
public void set(int value0, int value1, int value2) Description copied from interface:Uniform3iSets the value of a uniform -
set
public void set(int value0, int value1, int value2, int value3) Description copied from interface:Uniform4iSets the value of a uniform declared in json -
set
public void set(float value) Description copied from interface:Uniform1fSets the value of a uniform -
set
public void set(float value0, float value1) Description copied from interface:Uniform2fSets the value of a uniform declared in json -
set
public void set(org.joml.Vector2f value) Description copied from interface:Uniform2fSets the value of a uniform declared in jsonThe vector's value is read once when this method is called. Further mutations to the vector will have no effect on this uniform's value.
-
set
public void set(float value0, float value1, float value2) Description copied from interface:Uniform3fSets the value of a uniform declared in json -
set
public void set(org.joml.Vector3f value) Description copied from interface:Uniform3fSets the value of a uniform declared in jsonThe vector's value is read once when this method is called. Further mutations to the vector will have no effect on this uniform's value.
-
set
public void set(float value0, float value1, float value2, float value3) Description copied from interface:Uniform4fSets the value of a uniform declared in json -
set
public void set(org.joml.Vector4f value) Description copied from interface:Uniform4fSets the value of a uniform declared in jsonThe vector's value is read once when this method is called. Further mutations to the vector will have no effect on this uniform's value.
-
set
public void set(org.joml.Matrix4f value) Description copied from interface:UniformMat4Sets the value of a 4x4 matrix uniform- Specified by:
setin interfaceUniformMat4- Parameters:
value- a matrix
-
setFromArray
public void setFromArray(float[] values) Description copied from interface:UniformMat4Sets the value of a 4x4 matrix uniform through a float arrayThe
valuesarray must have a length of 16, and contain the matrix elements in column-major order.- Specified by:
setFromArrayin interfaceUniformMat4- Parameters:
values- an array representing a 4x4 matrix
-