Record Class ProgramDefinition
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.program.ProgramDefinition
- Record Components:
vertex- The vertex shader ornullto not include onetesselationControl- The tesselation control shader ornullto not include onetesselationEvaluation- The tesselation evluation shader ornullto not include onegeometry- The geometry shader ornullto not include onefragment- The fragment shader ornullto not include onecompute- The compute shader ornullto not include one. Compute should be in a shader by itselfdefinitions- The definitions to inject when compilingdefinitionDefaults- The default values for definitionssamplers- The samplers to bind when using this shadershaders- A map of all sources and their OpenGL types for conveniencerequiredFeatures- The features this shader requires, or it will not be allowed to loadblendMode- The blend mode to use ornullto use the current blend mode
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> samplers, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders, ShaderFeature[] requiredFeatures, @Nullable ShaderBlendMode blendMode)
extends Record
Defines a shader program instance.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionProgramDefinition(@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> samplers, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders, ShaderFeature[] requiredFeatures, @Nullable ShaderBlendMode blendMode) Creates an instance of aProgramDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ShaderBlendModeReturns the value of theblendModerecord component.@Nullable net.minecraft.resources.ResourceLocationcompute()Returns the value of thecomputerecord component.Returns the value of thedefinitionDefaultsrecord component.String[]Returns the value of thedefinitionsrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.resources.ResourceLocationfragment()Returns the value of thefragmentrecord component.@Nullable net.minecraft.resources.ResourceLocationgeometry()Returns the value of thegeometryrecord component.getMacros(Set<String> dependencies, ShaderPreDefinitions definitions) final inthashCode()Returns a hash code value for this object.Returns the value of therequiredFeaturesrecord component.samplers()Returns the value of thesamplersrecord component.it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders()Returns the value of theshadersrecord component.@Nullable net.minecraft.resources.ResourceLocationReturns the value of thetesselationControlrecord component.@Nullable net.minecraft.resources.ResourceLocationReturns the value of thetesselationEvaluationrecord component.final StringtoString()Returns a string representation of this record class.@Nullable net.minecraft.resources.ResourceLocationvertex()Returns the value of thevertexrecord component.
-
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> samplers, it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders, ShaderFeature[] requiredFeatures, @Nullable @Nullable ShaderBlendMode blendMode) Creates an instance of aProgramDefinitionrecord class.- Parameters:
vertex- the value for thevertexrecord componenttesselationControl- the value for thetesselationControlrecord componenttesselationEvaluation- the value for thetesselationEvaluationrecord componentgeometry- the value for thegeometryrecord componentfragment- the value for thefragmentrecord componentcompute- the value for thecomputerecord componentdefinitions- the value for thedefinitionsrecord componentdefinitionDefaults- the value for thedefinitionDefaultsrecord componentsamplers- the value for thesamplersrecord componentshaders- the value for theshadersrecord componentrequiredFeatures- the value for therequiredFeaturesrecord componentblendMode- the value for theblendModerecord component
-
-
Method Details
-
getMacros
-
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). -
vertex
@Nullable public @Nullable net.minecraft.resources.ResourceLocation vertex()Returns the value of thevertexrecord component.- Returns:
- the value of the
vertexrecord component
-
tesselationControl
@Nullable public @Nullable net.minecraft.resources.ResourceLocation tesselationControl()Returns the value of thetesselationControlrecord component.- Returns:
- the value of the
tesselationControlrecord component
-
tesselationEvaluation
@Nullable public @Nullable net.minecraft.resources.ResourceLocation tesselationEvaluation()Returns the value of thetesselationEvaluationrecord component.- Returns:
- the value of the
tesselationEvaluationrecord component
-
geometry
@Nullable public @Nullable net.minecraft.resources.ResourceLocation geometry()Returns the value of thegeometryrecord component.- Returns:
- the value of the
geometryrecord component
-
fragment
@Nullable public @Nullable net.minecraft.resources.ResourceLocation fragment()Returns the value of thefragmentrecord component.- Returns:
- the value of the
fragmentrecord component
-
compute
@Nullable public @Nullable net.minecraft.resources.ResourceLocation compute()Returns the value of thecomputerecord component.- Returns:
- the value of the
computerecord component
-
definitions
Returns the value of thedefinitionsrecord component.- Returns:
- the value of the
definitionsrecord component
-
definitionDefaults
Returns the value of thedefinitionDefaultsrecord component.- Returns:
- the value of the
definitionDefaultsrecord component
-
samplers
Returns the value of thesamplersrecord component.- Returns:
- the value of the
samplersrecord component
-
shaders
public it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.resources.ResourceLocation> shaders()Returns the value of theshadersrecord component.- Returns:
- the value of the
shadersrecord component
-
requiredFeatures
Returns the value of therequiredFeaturesrecord component.- Returns:
- the value of the
requiredFeaturesrecord component
-
blendMode
Returns the value of theblendModerecord component.- Returns:
- the value of the
blendModerecord component
-