Class ShaderSourceSet

java.lang.Object
foundry.veil.api.client.render.shader.ShaderSourceSet

public final class ShaderSourceSet extends Object
A location to load shader source files from.
  • Constructor Details

    • ShaderSourceSet

      public ShaderSourceSet(String folder)
  • Method Details

    • getFolder

      public String getFolder()
      Returns:
      The location to load shader definitions from
    • getShaderDefinitionLister

      public net.minecraft.resources.FileToIdConverter getShaderDefinitionLister()
      Returns:
      The lister for shader definitions
    • getGlslConverter

      public net.minecraft.resources.FileToIdConverter getGlslConverter()
      Returns:
      The converter for a regular glsl shader type
    • getTypeConverter

      public net.minecraft.resources.FileToIdConverter getTypeConverter(int type)
      Retrieves the id converter of a shader type.
      Parameters:
      type - The GL enum for the type
      Returns:
      The file type converter or glsl if the type is unknown
    • getShaderType

      public static int getShaderType(net.minecraft.resources.ResourceLocation location)
      Retrieves the type of shader the location points to based on extension.
      Parameters:
      location - The location of the file
      Returns:
      The GL type of the shader or -1 if invalid