Record Class SceneShaderInfo

java.lang.Object
java.lang.Record
guideme.siteexport.SceneShaderInfo
Record Components:
lighting - The type of lighting applied by the shader.
alphaTest - Fragments with an alpha below this value are discarded. 0 means no alpha test.
vertexColor - Whether the shader multiplies the vertex color into the output color.
textured - Whether the shader samples the texture bound to Sampler0.

public record SceneShaderInfo(SceneShaderInfo.Lighting lighting, float alphaTest, boolean vertexColor, boolean textured) extends Record
Describes how the shaders of a render pipeline process geometry, so that the web viewer can approximate them.
See Also:
  • Constructor Details

    • SceneShaderInfo

      public SceneShaderInfo(SceneShaderInfo.Lighting lighting, float alphaTest, boolean vertexColor, boolean textured)
      Creates an instance of a SceneShaderInfo record class.
      Parameters:
      lighting - the value for the lighting record component
      alphaTest - the value for the alphaTest record component
      vertexColor - the value for the vertexColor record component
      textured - the value for the textured record component
  • Method Details

    • fromPipeline

      public static SceneShaderInfo fromPipeline(com.mojang.blaze3d.pipeline.RenderPipeline pipeline)
      Derives the shader info from the pipeline definition, mirroring the behavior of the vanilla core shaders. This is used for all pipelines that no SceneShaderInfoProvider handles.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • lighting

      public SceneShaderInfo.Lighting lighting()
      Returns the value of the lighting record component.
      Returns:
      the value of the lighting record component
    • alphaTest

      public float alphaTest()
      Returns the value of the alphaTest record component.
      Returns:
      the value of the alphaTest record component
    • vertexColor

      public boolean vertexColor()
      Returns the value of the vertexColor record component.
      Returns:
      the value of the vertexColor record component
    • textured

      public boolean textured()
      Returns the value of the textured record component.
      Returns:
      the value of the textured record component