Class Shader

java.lang.Object
net.minecraft.client.render.Shader
All Implemented Interfaces:
AutoCloseable, GlShader

@Environment(CLIENT) public class Shader extends Object implements GlShader, AutoCloseable
Mappings:
Namespace Name
official ens
intermediary net/minecraft/class_5944
named net/minecraft/client/render/Shader
  • Field Details

    • field_32778

      private static final String field_32778
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official n Lens;n:Ljava/lang/String;
      intermediary field_32778 Lnet/minecraft/class_5944;field_32778:Ljava/lang/String;
      named field_32778 Lnet/minecraft/client/render/Shader;field_32778:Ljava/lang/String;
    • field_32779

      private static final String field_32779
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official o Lens;o:Ljava/lang/String;
      intermediary field_32779 Lnet/minecraft/class_5944;field_32779:Ljava/lang/String;
      named field_32779 Lnet/minecraft/client/render/Shader;field_32779:Ljava/lang/String;
    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official p Lens;p:Lorg/apache/logging/log4j/Logger;
      intermediary field_29483 Lnet/minecraft/class_5944;field_29483:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/client/render/Shader;LOGGER:Lorg/apache/logging/log4j/Logger;
    • DEFAULT_UNIFORM

      private static final Uniform DEFAULT_UNIFORM
      Mappings:
      Namespace Name Mixin selector
      official q Lens;q:Ldpv;
      intermediary field_29484 Lnet/minecraft/class_5944;field_29484:Lnet/minecraft/class_278;
      named DEFAULT_UNIFORM Lnet/minecraft/client/render/Shader;DEFAULT_UNIFORM:Lnet/minecraft/client/gl/Uniform;
    • field_32780

      private static final boolean field_32780
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official r Lens;r:Z
      intermediary field_32780 Lnet/minecraft/class_5944;field_32780:Z
      named field_32780 Lnet/minecraft/client/render/Shader;field_32780:Z
    • activeShader

      private static Shader activeShader
      Mappings:
      Namespace Name Mixin selector
      official s Lens;s:Lens;
      intermediary field_29485 Lnet/minecraft/class_5944;field_29485:Lnet/minecraft/class_5944;
      named activeShader Lnet/minecraft/client/render/Shader;activeShader:Lnet/minecraft/client/render/Shader;
    • activeShaderId

      private static int activeShaderId
      Mappings:
      Namespace Name Mixin selector
      official t Lens;t:I
      intermediary field_29486 Lnet/minecraft/class_5944;field_29486:I
      named activeShaderId Lnet/minecraft/client/render/Shader;activeShaderId:I
    • samplers

      private final Map<String,​Object> samplers
      Mappings:
      Namespace Name Mixin selector
      official u Lens;u:Ljava/util/Map;
      intermediary field_29487 Lnet/minecraft/class_5944;field_29487:Ljava/util/Map;
      named samplers Lnet/minecraft/client/render/Shader;samplers:Ljava/util/Map;
    • samplerNames

      private final List<String> samplerNames
      Mappings:
      Namespace Name Mixin selector
      official v Lens;v:Ljava/util/List;
      intermediary field_29488 Lnet/minecraft/class_5944;field_29488:Ljava/util/List;
      named samplerNames Lnet/minecraft/client/render/Shader;samplerNames:Ljava/util/List;
    • loadedSamplerIds

      private final List<Integer> loadedSamplerIds
      Mappings:
      Namespace Name Mixin selector
      official w Lens;w:Ljava/util/List;
      intermediary field_29489 Lnet/minecraft/class_5944;field_29489:Ljava/util/List;
      named loadedSamplerIds Lnet/minecraft/client/render/Shader;loadedSamplerIds:Ljava/util/List;
    • uniforms

      private final List<GlUniform> uniforms
      Mappings:
      Namespace Name Mixin selector
      official x Lens;x:Ljava/util/List;
      intermediary field_29490 Lnet/minecraft/class_5944;field_29490:Ljava/util/List;
      named uniforms Lnet/minecraft/client/render/Shader;uniforms:Ljava/util/List;
    • loadedUniformIds

      private final List<Integer> loadedUniformIds
      Mappings:
      Namespace Name Mixin selector
      official y Lens;y:Ljava/util/List;
      intermediary field_29491 Lnet/minecraft/class_5944;field_29491:Ljava/util/List;
      named loadedUniformIds Lnet/minecraft/client/render/Shader;loadedUniformIds:Ljava/util/List;
    • loadedUniforms

      private final Map<String,​GlUniform> loadedUniforms
      Mappings:
      Namespace Name Mixin selector
      official z Lens;z:Ljava/util/Map;
      intermediary field_29492 Lnet/minecraft/class_5944;field_29492:Ljava/util/Map;
      named loadedUniforms Lnet/minecraft/client/render/Shader;loadedUniforms:Ljava/util/Map;
    • programId

      private final int programId
      Mappings:
      Namespace Name Mixin selector
      official A Lens;A:I
      intermediary field_29493 Lnet/minecraft/class_5944;field_29493:I
      named programId Lnet/minecraft/client/render/Shader;programId:I
    • name

      private final String name
      Mappings:
      Namespace Name Mixin selector
      official B Lens;B:Ljava/lang/String;
      intermediary field_29494 Lnet/minecraft/class_5944;field_29494:Ljava/lang/String;
      named name Lnet/minecraft/client/render/Shader;name:Ljava/lang/String;
    • dirty

      private boolean dirty
      Mappings:
      Namespace Name Mixin selector
      official C Lens;C:Z
      intermediary field_29495 Lnet/minecraft/class_5944;field_29495:Z
      named dirty Lnet/minecraft/client/render/Shader;dirty:Z
    • blendState

      private final GlBlendState blendState
      Mappings:
      Namespace Name Mixin selector
      official D Lens;D:Ldpw;
      intermediary field_29464 Lnet/minecraft/class_5944;field_29464:Lnet/minecraft/class_277;
      named blendState Lnet/minecraft/client/render/Shader;blendState:Lnet/minecraft/client/gl/GlBlendState;
    • loadedAttributeIds

      private final List<Integer> loadedAttributeIds
      Mappings:
      Namespace Name Mixin selector
      official E Lens;E:Ljava/util/List;
      intermediary field_29465 Lnet/minecraft/class_5944;field_29465:Ljava/util/List;
      named loadedAttributeIds Lnet/minecraft/client/render/Shader;loadedAttributeIds:Ljava/util/List;
    • attributeNames

      private final List<String> attributeNames
      Mappings:
      Namespace Name Mixin selector
      official F Lens;F:Ljava/util/List;
      intermediary field_29466 Lnet/minecraft/class_5944;field_29466:Ljava/util/List;
      named attributeNames Lnet/minecraft/client/render/Shader;attributeNames:Ljava/util/List;
    • vertexShader

      private final Program vertexShader
      Mappings:
      Namespace Name Mixin selector
      official G Lens;G:Ldpz;
      intermediary field_29467 Lnet/minecraft/class_5944;field_29467:Lnet/minecraft/class_281;
      named vertexShader Lnet/minecraft/client/render/Shader;vertexShader:Lnet/minecraft/client/gl/Program;
    • fragmentShader

      private final Program fragmentShader
      Mappings:
      Namespace Name Mixin selector
      official H Lens;H:Ldpz;
      intermediary field_29468 Lnet/minecraft/class_5944;field_29468:Lnet/minecraft/class_281;
      named fragmentShader Lnet/minecraft/client/render/Shader;fragmentShader:Lnet/minecraft/client/gl/Program;
    • format

      private final VertexFormat format
      Mappings:
      Namespace Name Mixin selector
      official I Lens;I:Ldqp;
      intermediary field_29469 Lnet/minecraft/class_5944;field_29469:Lnet/minecraft/class_293;
      named format Lnet/minecraft/client/render/Shader;format:Lnet/minecraft/client/render/VertexFormat;
    • modelViewMat

      @Nullable public final @Nullable GlUniform modelViewMat
      Mappings:
      Namespace Name Mixin selector
      official a Lens;a:Ldqc;
      intermediary field_29470 Lnet/minecraft/class_5944;field_29470:Lnet/minecraft/class_284;
      named modelViewMat Lnet/minecraft/client/render/Shader;modelViewMat:Lnet/minecraft/client/gl/GlUniform;
    • projectionMat

      @Nullable public final @Nullable GlUniform projectionMat
      Mappings:
      Namespace Name Mixin selector
      official b Lens;b:Ldqc;
      intermediary field_29471 Lnet/minecraft/class_5944;field_29471:Lnet/minecraft/class_284;
      named projectionMat Lnet/minecraft/client/render/Shader;projectionMat:Lnet/minecraft/client/gl/GlUniform;
    • textureMat

      @Nullable public final @Nullable GlUniform textureMat
      Mappings:
      Namespace Name Mixin selector
      official c Lens;c:Ldqc;
      intermediary field_29472 Lnet/minecraft/class_5944;field_29472:Lnet/minecraft/class_284;
      named textureMat Lnet/minecraft/client/render/Shader;textureMat:Lnet/minecraft/client/gl/GlUniform;
    • screenSize

      @Nullable public final @Nullable GlUniform screenSize
      Mappings:
      Namespace Name Mixin selector
      official d Lens;d:Ldqc;
      intermediary field_29473 Lnet/minecraft/class_5944;field_29473:Lnet/minecraft/class_284;
      named screenSize Lnet/minecraft/client/render/Shader;screenSize:Lnet/minecraft/client/gl/GlUniform;
    • colorModulator

      @Nullable public final @Nullable GlUniform colorModulator
      Mappings:
      Namespace Name Mixin selector
      official e Lens;e:Ldqc;
      intermediary field_29474 Lnet/minecraft/class_5944;field_29474:Lnet/minecraft/class_284;
      named colorModulator Lnet/minecraft/client/render/Shader;colorModulator:Lnet/minecraft/client/gl/GlUniform;
    • light0Direction

      @Nullable public final @Nullable GlUniform light0Direction
      Mappings:
      Namespace Name Mixin selector
      official f Lens;f:Ldqc;
      intermediary field_29475 Lnet/minecraft/class_5944;field_29475:Lnet/minecraft/class_284;
      named light0Direction Lnet/minecraft/client/render/Shader;light0Direction:Lnet/minecraft/client/gl/GlUniform;
    • light1Direction

      @Nullable public final @Nullable GlUniform light1Direction
      Mappings:
      Namespace Name Mixin selector
      official g Lens;g:Ldqc;
      intermediary field_29476 Lnet/minecraft/class_5944;field_29476:Lnet/minecraft/class_284;
      named light1Direction Lnet/minecraft/client/render/Shader;light1Direction:Lnet/minecraft/client/gl/GlUniform;
    • fogStart

      @Nullable public final @Nullable GlUniform fogStart
      Mappings:
      Namespace Name Mixin selector
      official h Lens;h:Ldqc;
      intermediary field_29477 Lnet/minecraft/class_5944;field_29477:Lnet/minecraft/class_284;
      named fogStart Lnet/minecraft/client/render/Shader;fogStart:Lnet/minecraft/client/gl/GlUniform;
    • fogEnd

      @Nullable public final @Nullable GlUniform fogEnd
      Mappings:
      Namespace Name Mixin selector
      official i Lens;i:Ldqc;
      intermediary field_29478 Lnet/minecraft/class_5944;field_29478:Lnet/minecraft/class_284;
      named fogEnd Lnet/minecraft/client/render/Shader;fogEnd:Lnet/minecraft/client/gl/GlUniform;
    • fogColor

      @Nullable public final @Nullable GlUniform fogColor
      Mappings:
      Namespace Name Mixin selector
      official j Lens;j:Ldqc;
      intermediary field_29479 Lnet/minecraft/class_5944;field_29479:Lnet/minecraft/class_284;
      named fogColor Lnet/minecraft/client/render/Shader;fogColor:Lnet/minecraft/client/gl/GlUniform;
    • lineWidth

      @Nullable public final @Nullable GlUniform lineWidth
      Mappings:
      Namespace Name Mixin selector
      official k Lens;k:Ldqc;
      intermediary field_29480 Lnet/minecraft/class_5944;field_29480:Lnet/minecraft/class_284;
      named lineWidth Lnet/minecraft/client/render/Shader;lineWidth:Lnet/minecraft/client/gl/GlUniform;
    • gameTime

      @Nullable public final @Nullable GlUniform gameTime
      Mappings:
      Namespace Name Mixin selector
      official l Lens;l:Ldqc;
      intermediary field_29481 Lnet/minecraft/class_5944;field_29481:Lnet/minecraft/class_284;
      named gameTime Lnet/minecraft/client/render/Shader;gameTime:Lnet/minecraft/client/gl/GlUniform;
    • chunkOffset

      @Nullable public final @Nullable GlUniform chunkOffset
      Mappings:
      Namespace Name Mixin selector
      official m Lens;m:Ldqc;
      intermediary field_29482 Lnet/minecraft/class_5944;field_29482:Lnet/minecraft/class_284;
      named chunkOffset Lnet/minecraft/client/render/Shader;chunkOffset:Lnet/minecraft/client/gl/GlUniform;
  • Constructor Details

    • Shader

      public Shader(ResourceFactory factory, String name, VertexFormat format) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official <init> Lens;<init>(Ladv;Ljava/lang/String;Ldqp;)V
      intermediary <init> Lnet/minecraft/class_5944;<init>(Lnet/minecraft/class_5912;Ljava/lang/String;Lnet/minecraft/class_293;)V
      named <init> Lnet/minecraft/client/render/Shader;<init>(Lnet/minecraft/resource/ResourceFactory;Ljava/lang/String;Lnet/minecraft/client/render/VertexFormat;)V
  • Method Details

    • loadProgram

      private static Program loadProgram(ResourceFactory factory, Program.Type type, String name) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lens;a(Ladv;Ldpz$a;Ljava/lang/String;)Ldpz;
      intermediary method_34579 Lnet/minecraft/class_5944;method_34579(Lnet/minecraft/class_5912;Lnet/minecraft/class_281$class_282;Ljava/lang/String;)Lnet/minecraft/class_281;
      named loadProgram Lnet/minecraft/client/render/Shader;loadProgram(Lnet/minecraft/resource/ResourceFactory;Lnet/minecraft/client/gl/Program$Type;Ljava/lang/String;)Lnet/minecraft/client/gl/Program;
    • readBlendState

      public static GlBlendState readBlendState(JsonObject json)
      Mappings:
      Namespace Name Mixin selector
      official a Lens;a(Lcom/google/gson/JsonObject;)Ldpw;
      intermediary method_34581 Lnet/minecraft/class_5944;method_34581(Lcom/google/gson/JsonObject;)Lnet/minecraft/class_277;
      named readBlendState Lnet/minecraft/client/render/Shader;readBlendState(Lcom/google/gson/JsonObject;)Lnet/minecraft/client/gl/GlBlendState;
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • bind

      public void bind()
      Mappings:
      Namespace Name Mixin selector
      official f Lens;f()V
      intermediary method_34585 Lnet/minecraft/class_5944;method_34585()V
      named bind Lnet/minecraft/client/render/Shader;bind()V
    • upload

      public void upload()
      Mappings:
      Namespace Name Mixin selector
      official g Lens;g()V
      intermediary method_34586 Lnet/minecraft/class_5944;method_34586()V
      named upload Lnet/minecraft/client/render/Shader;upload()V
    • markUniformsDirty

      public void markUniformsDirty()
      Specified by:
      markUniformsDirty in interface GlShader
      Mappings:
      Namespace Name Mixin selector
      official b Ldqb;b()V
      intermediary method_1279 Lnet/minecraft/class_3679;method_1279()V
      named markUniformsDirty Lnet/minecraft/client/gl/GlShader;markUniformsDirty()V
    • getUniform

      @Nullable public @Nullable GlUniform getUniform(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Lens;a(Ljava/lang/String;)Ldqc;
      intermediary method_34582 Lnet/minecraft/class_5944;method_34582(Ljava/lang/String;)Lnet/minecraft/class_284;
      named getUniform Lnet/minecraft/client/render/Shader;getUniform(Ljava/lang/String;)Lnet/minecraft/client/gl/GlUniform;
    • method_35785

      public Uniform method_35785(String string)
      Mappings:
      Namespace Name Mixin selector
      official b Lens;b(Ljava/lang/String;)Ldpv;
      intermediary method_35785 Lnet/minecraft/class_5944;method_35785(Ljava/lang/String;)Lnet/minecraft/class_278;
      named method_35785 Lnet/minecraft/client/render/Shader;method_35785(Ljava/lang/String;)Lnet/minecraft/client/gl/Uniform;
    • loadReferences

      private void loadReferences()
      Mappings:
      Namespace Name Mixin selector
      official j Lens;j()V
      intermediary method_34588 Lnet/minecraft/class_5944;method_34588()V
      named loadReferences Lnet/minecraft/client/render/Shader;loadReferences()V
    • readSampler

      private void readSampler(JsonElement json)
      Mappings:
      Namespace Name Mixin selector
      official a Lens;a(Lcom/google/gson/JsonElement;)V
      intermediary method_34580 Lnet/minecraft/class_5944;method_34580(Lcom/google/gson/JsonElement;)V
      named readSampler Lnet/minecraft/client/render/Shader;readSampler(Lcom/google/gson/JsonElement;)V
    • addSampler

      public void addSampler(String name, Object sampler)
      Mappings:
      Namespace Name Mixin selector
      official a Lens;a(Ljava/lang/String;Ljava/lang/Object;)V
      intermediary method_34583 Lnet/minecraft/class_5944;method_34583(Ljava/lang/String;Ljava/lang/Object;)V
      named addSampler Lnet/minecraft/client/render/Shader;addSampler(Ljava/lang/String;Ljava/lang/Object;)V
    • addUniform

      private void addUniform(JsonElement json) throws ShaderParseException
      Throws:
      ShaderParseException
      Mappings:
      Namespace Name Mixin selector
      official b Lens;b(Lcom/google/gson/JsonElement;)V
      intermediary method_34584 Lnet/minecraft/class_5944;method_34584(Lcom/google/gson/JsonElement;)V
      named addUniform Lnet/minecraft/client/render/Shader;addUniform(Lcom/google/gson/JsonElement;)V
    • getVertexShader

      public Program getVertexShader()
      Specified by:
      getVertexShader in interface GlShader
      Mappings:
      Namespace Name Mixin selector
      official c Ldqb;c()Ldpz;
      intermediary method_1274 Lnet/minecraft/class_3679;method_1274()Lnet/minecraft/class_281;
      named getVertexShader Lnet/minecraft/client/gl/GlShader;getVertexShader()Lnet/minecraft/client/gl/Program;
    • getFragmentShader

      public Program getFragmentShader()
      Specified by:
      getFragmentShader in interface GlShader
      Mappings:
      Namespace Name Mixin selector
      official d Ldqb;d()Ldpz;
      intermediary method_1278 Lnet/minecraft/class_3679;method_1278()Lnet/minecraft/class_281;
      named getFragmentShader Lnet/minecraft/client/gl/GlShader;getFragmentShader()Lnet/minecraft/client/gl/Program;
    • attachReferencedShaders

      public void attachReferencedShaders()
      Specified by:
      attachReferencedShaders in interface GlShader
      Mappings:
      Namespace Name Mixin selector
      official e Ldqb;e()V
      intermediary method_34418 Lnet/minecraft/class_3679;method_34418()V
      named attachReferencedShaders Lnet/minecraft/client/gl/GlShader;attachReferencedShaders()V
    • method_35786

      public VertexFormat method_35786()
      Mappings:
      Namespace Name Mixin selector
      official h Lens;h()Ldqp;
      intermediary method_35786 Lnet/minecraft/class_5944;method_35786()Lnet/minecraft/class_293;
      named method_35786 Lnet/minecraft/client/render/Shader;method_35786()Lnet/minecraft/client/render/VertexFormat;
    • method_35787

      public String method_35787()
      Mappings:
      Namespace Name Mixin selector
      official i Lens;i()Ljava/lang/String;
      intermediary method_35787 Lnet/minecraft/class_5944;method_35787()Ljava/lang/String;
      named method_35787 Lnet/minecraft/client/render/Shader;method_35787()Ljava/lang/String;
    • getProgramRef

      public int getProgramRef()
      Specified by:
      getProgramRef in interface GlShader
      Mappings:
      Namespace Name Mixin selector
      official a Ldqb;a()I
      intermediary method_1270 Lnet/minecraft/class_3679;method_1270()I
      named getProgramRef Lnet/minecraft/client/gl/GlShader;getProgramRef()I