Class ShaderLineProcessor
java.lang.Object
foundry.veil.api.client.render.shader.processor.ShaderLineProcessor
- All Implemented Interfaces:
ShaderPreProcessor
- Direct Known Subclasses:
ShaderBindingProcessor
Processes shader sources line by line.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
modify
(@NotNull ShaderPreProcessor.Context context, @NotNull String original, @NotNull List<String> line) Modifies a single line in a shader source.@NotNull String
modify
(@NotNull ShaderPreProcessor.Context context, String source) Modifies the specified shader source input.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.processor.ShaderPreProcessor
prepare
-
Constructor Details
-
ShaderLineProcessor
public ShaderLineProcessor()
-
-
Method Details
-
modify
@NotNull public @NotNull String modify(@NotNull @NotNull ShaderPreProcessor.Context context, String source) throws IOException Description copied from interface:ShaderPreProcessor
Modifies the specified shader source input.- Specified by:
modify
in interfaceShaderPreProcessor
- Parameters:
context
- 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
-
modify
public abstract void modify(@NotNull @NotNull ShaderPreProcessor.Context context, @NotNull @NotNull String original, @NotNull @NotNull List<String> line) throws IOException Modifies a single line in a shader source.- Parameters:
context
- Context for modifying shadersoriginal
- A copy of the original sourceline
- The data to use as the current line. The original source is the first element and can be modified as necessary. The source can be replaced by clearing the list and adding new source.- Throws:
IOException
- If any error occurs while editing the source
-