Interface ShaderPreProcessor

All Known Implementing Classes:
ShaderBindingProcessor, ShaderImportProcessor, ShaderLineProcessor, ShaderModifyProcessor, ShaderPredefinitionProcessor, ShaderVersionProcessor

public interface ShaderPreProcessor
Modifies the source code of a shader before compilation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Context for modifying source code and shader behavior.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Pattern
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Modifies the specified shader source input.
    default void
    Called once when a shader is first run through the pre-processor.
  • Field Details

    • UNIFORM_PATTERN

      static final Pattern UNIFORM_PATTERN
  • Method Details

    • prepare

      default void prepare()
      Called once when a shader is first run through the pre-processor.
    • modify

      Modifies the specified shader source input.
      Parameters:
      context - Context for modifying shaders
      Returns:
      The modified source or the input if nothing changed
      Throws:
      IOException - If any error occurs while editing the source