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
    • APPLY_VERSION

      static final int APPLY_VERSION
      Whether the version is required and will be applied
      See Also:
    • ALLOW_OUT

      static final int ALLOW_OUT
      Whether [OUT] is a valid command
      See Also:
  • Method Details

    • inject

      String inject(String source, int flags) throws IOException
      Injects this modification into the specified shader source.
      Parameters:
      source - The source to inject into
      flags - The flags to use when injecting
      Returns:
      The injected shader source
      Throws:
      IOException - If an error occurs with the format or applying the modifications
    • getPriority

      int getPriority()
      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