Record Class ShaderMultiProcessor
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.processor.ShaderMultiProcessor
- All Implemented Interfaces:
ShaderPreProcessor
public record ShaderMultiProcessor(ShaderPreProcessor[] processors)
extends Record
implements ShaderPreProcessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.shader.processor.ShaderPreProcessor
ShaderPreProcessor.Context
-
Field Summary
Fields inherited from interface foundry.veil.api.client.render.shader.processor.ShaderPreProcessor
NOOP, UNIFORM_PATTERN
-
Constructor Summary
ConstructorDescriptionShaderMultiProcessor
(ShaderPreProcessor[] processors) Creates an instance of aShaderMultiProcessor
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.modify
(ShaderPreProcessor.Context ctx, String source) Modifies the specified shader source input.void
prepare()
Called once when a shader is first run through the pre-processor.Returns the value of theprocessors
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ShaderMultiProcessor
Creates an instance of aShaderMultiProcessor
record class.- Parameters:
processors
- the value for theprocessors
record component
-
-
Method Details
-
prepare
public void prepare()Description copied from interface:ShaderPreProcessor
Called once when a shader is first run through the pre-processor.- Specified by:
prepare
in interfaceShaderPreProcessor
-
modify
Description copied from interface:ShaderPreProcessor
Modifies the specified shader source input.- Specified by:
modify
in interfaceShaderPreProcessor
- Parameters:
ctx
- Context for modifying shaderssource
- The GLSL source code to modify- Returns:
- The modified source or the input if nothing changed
- Throws:
IOException
- If any error occurs while editing the source
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
processors
Returns the value of theprocessors
record component.- Returns:
- the value of the
processors
record component
-