Interface ShaderModification
- All Known Implementing Classes:
InputShaderModification,ReplaceShaderModification,SimpleShaderModification,VertexShaderModification
@Internal
public interface ShaderModification
Allows shader source files to be modified without overwriting the file.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidinject(io.github.ocelot.glslprocessor.api.node.GlslTree tree, VeilJobParameters parameters) Injects this modification into the specified shader source.static ShaderModificationintpriority()
-
Field Details
-
VERSION_PATTERN
-
OUT_PATTERN
-
IN_PATTERN
-
UNIFORM_PATTERN
-
RETURN_PATTERN
-
PLACEHOLDER_PATTERN
-
-
Method Details
-
inject
void inject(io.github.ocelot.glslprocessor.api.node.GlslTree tree, VeilJobParameters parameters) throws io.github.ocelot.glslprocessor.api.GlslSyntaxException, IOException Injects this modification into the specified shader source.- Parameters:
tree- The source to modifyparameters- The parameters to use when injecting- Throws:
io.github.ocelot.glslprocessor.api.GlslSyntaxException- If an error occurs when parsing GLSL codeIOException- If an error occurs with the format or applying the modifications
-
priority
int priority()- Returns:
- The priority of this modification. A higher priority will be applied before a lower priority modification
-
parse
static ShaderModification parse(String input, boolean vertex) throws ShaderModificationSyntaxException
-