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 epw
intermediary net/minecraft/class_5944
named net/minecraft/client/render/Shader
  • Field Details

    • CORE_DIRECTORY

      private static final String CORE_DIRECTORY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official o Lepw;o:Ljava/lang/String;
      intermediary field_32778 Lnet/minecraft/class_5944;field_32778:Ljava/lang/String;
      named CORE_DIRECTORY Lnet/minecraft/client/render/Shader;CORE_DIRECTORY:Ljava/lang/String;
    • INCLUDE_DIRECTORY

      private static final String INCLUDE_DIRECTORY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official p Lepw;p:Ljava/lang/String;
      intermediary field_32779 Lnet/minecraft/class_5944;field_32779:Ljava/lang/String;
      named INCLUDE_DIRECTORY Lnet/minecraft/client/render/Shader;INCLUDE_DIRECTORY:Ljava/lang/String;
    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official q Lepw;q: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 r Lepw;r:Ldru;
      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:
      Mappings:
      Namespace Name Mixin selector
      official s Lepw;s: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 t Lepw;t:Lepw;
      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 u Lepw;u: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 v Lepw;v: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 w Lepw;w: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 x Lepw;x: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 y Lepw;y: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 z Lepw;z: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 A Lepw;A: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 B Lepw;B: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 C Lepw;C: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 D Lepw;D: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 E Lepw;E:Ldrv;
      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 F Lepw;F: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 G Lepw;G: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 H Lepw;H:Ldry;
      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 I Lepw;I:Ldry;
      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 J Lepw;J:Ldso;
      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 Lepw;a:Ldsb;
      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 Lepw;b:Ldsb;
      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;
    • field_36323

      @Nullable public final @Nullable GlUniform field_36323
      Mappings:
      Namespace Name Mixin selector
      official c Lepw;c:Ldsb;
      intermediary field_36323 Lnet/minecraft/class_5944;field_36323:Lnet/minecraft/class_284;
      named field_36323 Lnet/minecraft/client/render/Shader;field_36323:Lnet/minecraft/client/gl/GlUniform;
    • textureMat

      @Nullable public final @Nullable GlUniform textureMat
      Mappings:
      Namespace Name Mixin selector
      official d Lepw;d:Ldsb;
      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 e Lepw;e:Ldsb;
      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 f Lepw;f:Ldsb;
      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 g Lepw;g:Ldsb;
      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 h Lepw;h:Ldsb;
      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 i Lepw;i:Ldsb;
      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 j Lepw;j:Ldsb;
      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 k Lepw;k:Ldsb;
      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 l Lepw;l:Ldsb;
      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 m Lepw;m:Ldsb;
      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 n Lepw;n:Ldsb;
      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> Lepw;<init>(Lafm;Ljava/lang/String;Ldso;)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 Lepw;a(Lafm;Ldry$a;Ljava/lang/String;)Ldry;
      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 Lepw;a(Lcom/google/gson/JsonObject;)Ldrv;
      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
    • unbind

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

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

      public void markUniformsDirty()
      Specified by:
      markUniformsDirty in interface GlShader
      Mappings:
      Namespace Name Mixin selector
      official b Ldsa;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 Lepw;a(Ljava/lang/String;)Ldsb;
      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;
    • getUniformOrDefault

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

      private void loadReferences()
      Mappings:
      Namespace Name Mixin selector
      official j Lepw;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 Lepw;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 Lepw;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 Lepw;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 Ldsa;c()Ldry;
      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 Ldsa;d()Ldry;
      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 Ldsa;e()V
      intermediary method_34418 Lnet/minecraft/class_3679;method_34418()V
      named attachReferencedShaders Lnet/minecraft/client/gl/GlShader;attachReferencedShaders()V
    • getFormat

      public VertexFormat getFormat()
      Mappings:
      Namespace Name Mixin selector
      official h Lepw;h()Ldso;
      intermediary method_35786 Lnet/minecraft/class_5944;method_35786()Lnet/minecraft/class_293;
      named getFormat Lnet/minecraft/client/render/Shader;getFormat()Lnet/minecraft/client/render/VertexFormat;
    • getName

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

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