Class SimpleShaderModification

java.lang.Object
foundry.veil.render.shader.modifier.SimpleShaderModification
All Implemented Interfaces:
ShaderModification
Direct Known Subclasses:
VertexShaderModification

@Internal public class SimpleShaderModification extends Object implements ShaderModification
  • Constructor Details

    • SimpleShaderModification

      public SimpleShaderModification(int version, int priority, net.minecraft.resources.ResourceLocation[] includes, @Nullable @Nullable String output, @Nullable @Nullable String uniform, ShaderModification.Function[] functions)
  • Method Details

    • inject

      public String inject(String source, int flags) throws IOException
      Description copied from interface: ShaderModification
      Injects this modification into the specified shader source.
      Specified by:
      inject in interface ShaderModification
      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
    • processBody

      protected void processBody(int pointer, StringBuilder builder) throws IOException
      Throws:
      IOException
    • fillPlaceholders

      public String fillPlaceholders(String code)
    • getPlaceholder

      protected String getPlaceholder(String key)
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface ShaderModification
      Returns:
      The priority of this modification. A higher priority will be applied before a lower priority modification
    • getOutput

      public String getOutput()