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.
  • Field Details

    • VERSION_PATTERN

      static final Pattern VERSION_PATTERN
    • OUT_PATTERN

      static final Pattern OUT_PATTERN
    • IN_PATTERN

      static final Pattern IN_PATTERN
    • UNIFORM_PATTERN

      static final Pattern UNIFORM_PATTERN
    • RETURN_PATTERN

      static final Pattern RETURN_PATTERN
    • PLACEHOLDER_PATTERN

      static final Pattern PLACEHOLDER_PATTERN
  • Method Details

    • inject

      void inject(io.github.douira.glsl_transformer.ast.transform.ASTParser parser, io.github.douira.glsl_transformer.ast.node.TranslationUnit tree, VeilJobParameters parameters) throws IOException
      Injects this modification into the specified shader source.
      Parameters:
      parser - The parser instance
      tree - The source to modify
      parameters - The parameters to use when injecting
      Throws:
      IOException - 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
      Throws:
      ShaderModificationSyntaxException