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.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 modify
      parameters - The parameters to use when injecting
      Throws:
      io.github.ocelot.glslprocessor.api.GlslSyntaxException - If an error occurs when parsing GLSL code
      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