Package net.minecraft.client.renderer
Class ShaderInstance
java.lang.Object
net.minecraft.client.renderer.ShaderInstance
- All Implemented Interfaces:
Shader
,AutoCloseable
-
Field Summary
Modifier and TypeFieldDescriptionprivate static boolean
private BlendMode
private boolean
private static AbstractUniform
private Program
private static ShaderInstance
private static int
(package private) static org.apache.logging.log4j.Logger
private String
private int
private static String
private static String
private VertexFormat
private Program
-
Constructor Summary
ConstructorDescriptionShaderInstance(ResourceProvider p_173336_, String p_173337_, VertexFormat p_173338_)
Deprecated.ShaderInstance(ResourceProvider p_173336_, ResourceLocation shaderLocation, VertexFormat p_173338_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply()
void
void
clear()
void
close()
int
getId()
getName()
private static Program
getOrCreate(ResourceProvider p_173341_, Program.Type p_173342_, String p_173343_)
getUniform(String p_173349_)
void
static BlendMode
parseBlendNode(com.google.gson.JsonObject p_173347_)
private void
parseSamplerNode(com.google.gson.JsonElement p_173345_)
private void
parseUniformNode(com.google.gson.JsonElement p_173355_)
safeGetUniform(String p_173357_)
void
setSampler(String p_173351_, Object p_173352_)
private void
-
Field Details
-
SHADER_PATH
- See Also:
- Constant Field Values
-
SHADER_INCLUDE_PATH
- See Also:
- Constant Field Values
-
LOGGER
static final org.apache.logging.log4j.Logger LOGGER -
DUMMY_UNIFORM
-
ALWAYS_REAPPLY
private static final boolean ALWAYS_REAPPLY- See Also:
- Constant Field Values
-
lastAppliedShader
-
lastProgramId
private static int lastProgramId -
samplerMap
-
samplerNames
-
samplerLocations
-
uniforms
-
uniformLocations
-
uniformMap
-
programId
private final int programId -
name
-
dirty
private boolean dirty -
blend
-
attributes
-
attributeNames
-
vertexProgram
-
fragmentProgram
-
vertexFormat
-
MODEL_VIEW_MATRIX
-
PROJECTION_MATRIX
-
TEXTURE_MATRIX
-
SCREEN_SIZE
-
COLOR_MODULATOR
-
LIGHT0_DIRECTION
-
LIGHT1_DIRECTION
-
FOG_START
-
FOG_END
-
FOG_COLOR
-
LINE_WIDTH
-
GAME_TIME
-
CHUNK_OFFSET
-
-
Constructor Details
-
ShaderInstance
@Deprecated public ShaderInstance(ResourceProvider p_173336_, String p_173337_, VertexFormat p_173338_) throws IOExceptionDeprecated.- Throws:
IOException
-
ShaderInstance
public ShaderInstance(ResourceProvider p_173336_, ResourceLocation shaderLocation, VertexFormat p_173338_) throws IOException- Throws:
IOException
-
-
Method Details
-
getOrCreate
private static Program getOrCreate(ResourceProvider p_173341_, Program.Type p_173342_, String p_173343_) throws IOException- Throws:
IOException
-
parseBlendNode
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
clear
public void clear() -
apply
public void apply() -
markDirty
public void markDirty() -
getUniform
-
safeGetUniform
-
updateLocations
private void updateLocations() -
parseSamplerNode
private void parseSamplerNode(com.google.gson.JsonElement p_173345_) -
setSampler
-
parseUniformNode
- Throws:
ChainedJsonException
-
getVertexProgram
- Specified by:
getVertexProgram
in interfaceShader
-
getFragmentProgram
- Specified by:
getFragmentProgram
in interfaceShader
-
attachToProgram
public void attachToProgram()- Specified by:
attachToProgram
in interfaceShader
-
getVertexFormat
-
getName
-
getId
public int getId()
-