Class ShaderVersionProcessor

java.lang.Object
foundry.veil.api.client.render.shader.processor.ShaderVersionProcessor
All Implemented Interfaces:
ShaderPreProcessor

public class ShaderVersionProcessor extends Object implements ShaderPreProcessor
Adds the version and required extensions for all shaders that do not define a version.
  • Field Details

    • PATTERN

      public static final Pattern PATTERN
  • Constructor Details

    • ShaderVersionProcessor

      public ShaderVersionProcessor()
  • Method Details

    • modify

      @NotNull public @NotNull String modify(@NotNull @NotNull ShaderPreProcessor.Context context, String source)
      Description copied from interface: ShaderPreProcessor
      Modifies the specified shader source input.
      Specified by:
      modify in interface ShaderPreProcessor
      Parameters:
      context - Context for modifying shaders
      source - The GLSL source code to modify
      Returns:
      The modified source or the input if nothing changed