Record Class VeilShaderSource
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.compiler.VeilShaderSource
- Record Components:
sourceId- The id of the source file this shader was compiled from ornullif from raw sourcesourceCode- The shader source ready to be uploaded to the GPUuniformBindings- The bindings set by the shaderdefinitionDependencies- The shader pre-definitions this shader is dependent onincludes- All shader imports included in this file
public record VeilShaderSource(@Nullable net.minecraft.resources.ResourceLocation sourceId, String sourceCode, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes)
extends Record
A shader instance that has additional pre-compiled data.
-
Constructor Summary
ConstructorsConstructorDescriptionVeilShaderSource(@Nullable net.minecraft.resources.ResourceLocation sourceId, String sourceCode) VeilShaderSource(@Nullable net.minecraft.resources.ResourceLocation sourceId, String sourceCode, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes) Creates an instance of aVeilShaderSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefinitionDependenciesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Set<net.minecraft.resources.ResourceLocation> includes()Returns the value of theincludesrecord component.Returns the value of thesourceCoderecord component.@Nullable net.minecraft.resources.ResourceLocationsourceId()Returns the value of thesourceIdrecord component.final StringtoString()Returns a string representation of this record class.it.unimi.dsi.fastutil.objects.Object2IntMap<String> Returns the value of theuniformBindingsrecord component.
-
Constructor Details
-
VeilShaderSource
public VeilShaderSource(@Nullable @Nullable net.minecraft.resources.ResourceLocation sourceId, String sourceCode) -
VeilShaderSource
public VeilShaderSource(@Nullable @Nullable net.minecraft.resources.ResourceLocation sourceId, String sourceCode, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes) Creates an instance of aVeilShaderSourcerecord class.- Parameters:
sourceId- the value for thesourceIdrecord componentsourceCode- the value for thesourceCoderecord componentuniformBindings- the value for theuniformBindingsrecord componentdefinitionDependencies- the value for thedefinitionDependenciesrecord componentincludes- the value for theincludesrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
sourceId
@Nullable public @Nullable net.minecraft.resources.ResourceLocation sourceId()Returns the value of thesourceIdrecord component.- Returns:
- the value of the
sourceIdrecord component
-
sourceCode
Returns the value of thesourceCoderecord component.- Returns:
- the value of the
sourceCoderecord component
-
uniformBindings
Returns the value of theuniformBindingsrecord component.- Returns:
- the value of the
uniformBindingsrecord component
-
definitionDependencies
Returns the value of thedefinitionDependenciesrecord component.- Returns:
- the value of the
definitionDependenciesrecord component
-
includes
Returns the value of theincludesrecord component.- Returns:
- the value of the
includesrecord component
-