Class ShaderBindingProcessor

java.lang.Object
foundry.veil.render.shader.processor.ShaderLineProcessor
foundry.veil.render.shader.processor.ShaderBindingProcessor
All Implemented Interfaces:
ShaderPreProcessor

public class ShaderBindingProcessor extends ShaderLineProcessor
Adds support for layout(binding = #) in the shader source without needing shader version 420.
  • Constructor Details

    • ShaderBindingProcessor

      public ShaderBindingProcessor()
  • Method Details

    • modify

      public void modify(@NotNull @NotNull ShaderPreProcessor.Context context, @NotNull @NotNull String original, @NotNull @NotNull List<String> line) throws IOException
      Description copied from class: ShaderLineProcessor
      Modifies a single line in a shader source.
      Specified by:
      modify in class ShaderLineProcessor
      Parameters:
      context - Context for modifying shaders
      original - A copy of the original source
      line - The data to use as the current line. The original source is the first element and can be modified as necessary. The source can be replaced by clearing the list and adding new source.
      Throws:
      IOException - If any error occurs while editing the source