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 eyf
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 p Leyf;p: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 q Leyf;q: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 org.slf4j.Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official r Leyf;r:Lorg/slf4j/Logger;
      intermediary field_29483 Lnet/minecraft/class_5944;field_29483:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/client/render/Shader;LOGGER:Lorg/slf4j/Logger;
    • DEFAULT_UNIFORM

      private static final Uniform DEFAULT_UNIFORM
      Mappings:
      Namespace Name Mixin selector
      official s Leyf;s:Ldzc;
      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 t Leyf;t: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 u Leyf;u:Leyf;
      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 v Leyf;v: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 w Leyf;w: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 x Leyf;x: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 y Leyf;y: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 z Leyf;z: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 A Leyf;A: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 B Leyf;B: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 C Leyf;C: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 D Leyf;D: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 E Leyf;E: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 F Leyf;F:Ldzd;
      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 G Leyf;G: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 H Leyf;H: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 I Leyf;I:Ldzh;
      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 J Leyf;J:Ldzh;
      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 K Leyf;K:Ldzy;
      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 Leyf;a:Ldzk;
      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 Leyf;b:Ldzk;
      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;
    • viewRotationMat

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

      @Nullable public final @Nullable GlUniform textureMat
      Mappings:
      Namespace Name Mixin selector
      official d Leyf;d:Ldzk;
      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 Leyf;e:Ldzk;
      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 Leyf;f:Ldzk;
      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 Leyf;g:Ldzk;
      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 Leyf;h:Ldzk;
      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 Leyf;i:Ldzk;
      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 Leyf;j:Ldzk;
      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 Leyf;k:Ldzk;
      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;
    • fogShape

      @Nullable public final @Nullable GlUniform fogShape
      Mappings:
      Namespace Name Mixin selector
      official l Leyf;l:Ldzk;
      intermediary field_36373 Lnet/minecraft/class_5944;field_36373:Lnet/minecraft/class_284;
      named fogShape Lnet/minecraft/client/render/Shader;fogShape:Lnet/minecraft/client/gl/GlUniform;
    • lineWidth

      @Nullable public final @Nullable GlUniform lineWidth
      Mappings:
      Namespace Name Mixin selector
      official m Leyf;m:Ldzk;
      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 n Leyf;n:Ldzk;
      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 o Leyf;o:Ldzk;
      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> Leyf;<init>(Lahx;Ljava/lang/String;Ldzy;)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 Leyf;a(Lahx;Ldzh$a;Ljava/lang/String;)Ldzh;
      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 Leyf;a(Lcom/google/gson/JsonObject;)Ldzd;
      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 Leyf;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 Leyf;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 Ldzj;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 Leyf;a(Ljava/lang/String;)Ldzk;
      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 Leyf;b(Ljava/lang/String;)Ldzc;
      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 Leyf;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 Leyf;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 Leyf;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 Leyf;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 Ldzj;c()Ldzh;
      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 Ldzj;d()Ldzh;
      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 Ldzj;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 Leyf;h()Ldzy;
      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 Leyf;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 Ldzj;a()I
      intermediary method_1270 Lnet/minecraft/class_3679;method_1270()I
      named getProgramRef Lnet/minecraft/client/gl/GlShader;getProgramRef()I