Record Class ProgramDefinition

java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.program.ProgramDefinition
Record Components:
vertex - The vertex shader or null to not include one
tesselationControl - The tesselation control shader or null to not include one
tesselationEvaluation - The tesselation evluation shader or null to not include one
geometry - The geometry shader or null to not include one
fragment - The fragment shader or null to not include one
compute - The compute shader or null to not include one. Compute should be in a shader by itself
definitions - The definitions to inject when compiling
definitionDefaults - The default values for definitions
textures - The textures to bind when using this shader
shaders - A map of all sources and their OpenGL types for convenience

public record ProgramDefinition(@Nullable net.minecraft.resources.ResourceLocation vertex, @Nullable net.minecraft.resources.ResourceLocation tesselationControl, @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation, @Nullable net.minecraft.resources.ResourceLocation geometry, @Nullable net.minecraft.resources.ResourceLocation fragment, @Nullable net.minecraft.resources.ResourceLocation compute, String[] definitions, Map<String,String> definitionDefaults, Map<String,ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders) extends Record
Defines a shader program instance.
  • Constructor Details

    • ProgramDefinition

      public ProgramDefinition(@Nullable @Nullable net.minecraft.resources.ResourceLocation vertex, @Nullable @Nullable net.minecraft.resources.ResourceLocation tesselationControl, @Nullable @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation, @Nullable @Nullable net.minecraft.resources.ResourceLocation geometry, @Nullable @Nullable net.minecraft.resources.ResourceLocation fragment, @Nullable @Nullable net.minecraft.resources.ResourceLocation compute, String[] definitions, Map<String,String> definitionDefaults, Map<String,ShaderTextureSource> textures, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders)
      Creates an instance of a ProgramDefinition record class.
      Parameters:
      vertex - the value for the vertex record component
      tesselationControl - the value for the tesselationControl record component
      tesselationEvaluation - the value for the tesselationEvaluation record component
      geometry - the value for the geometry record component
      fragment - the value for the fragment record component
      compute - the value for the compute record component
      definitions - the value for the definitions record component
      definitionDefaults - the value for the definitionDefaults record component
      textures - the value for the textures record component
      shaders - the value for the shaders record component
  • Method Details

    • getMacros

      public Map<String,String> getMacros(Set<String> dependencies, ShaderPreDefinitions definitions)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • vertex

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation vertex()
      Returns the value of the vertex record component.
      Returns:
      the value of the vertex record component
    • tesselationControl

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation tesselationControl()
      Returns the value of the tesselationControl record component.
      Returns:
      the value of the tesselationControl record component
    • tesselationEvaluation

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation()
      Returns the value of the tesselationEvaluation record component.
      Returns:
      the value of the tesselationEvaluation record component
    • geometry

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation geometry()
      Returns the value of the geometry record component.
      Returns:
      the value of the geometry record component
    • fragment

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation fragment()
      Returns the value of the fragment record component.
      Returns:
      the value of the fragment record component
    • compute

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation compute()
      Returns the value of the compute record component.
      Returns:
      the value of the compute record component
    • definitions

      public String[] definitions()
      Returns the value of the definitions record component.
      Returns:
      the value of the definitions record component
    • definitionDefaults

      public Map<String,String> definitionDefaults()
      Returns the value of the definitionDefaults record component.
      Returns:
      the value of the definitionDefaults record component
    • textures

      public Map<String,ShaderTextureSource> textures()
      Returns the value of the textures record component.
      Returns:
      the value of the textures record component
    • shaders

      public it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders()
      Returns the value of the shaders record component.
      Returns:
      the value of the shaders record component