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 final boolean
final Uniform
final Uniform
private boolean
private static final AbstractUniform
final Uniform
final Uniform
final Uniform
final Uniform
private final Program
final Uniform
final Uniform
private static ShaderInstance
private static int
final Uniform
final Uniform
final Uniform
(package private) static final org.slf4j.Logger
final Uniform
private final String
private final int
final Uniform
final Uniform
private static final String
private static final String
static final String
final Uniform
private final VertexFormat
private final 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
private void
parseSamplerNode
(com.google.gson.JsonElement p_173345_) private void
parseUniformNode
(com.google.gson.JsonElement p_173355_) safeGetUniform
(String p_173357_) void
setDefaultUniforms
(VertexFormat.Mode p_343995_, org.joml.Matrix4f p_342135_, org.joml.Matrix4f p_342482_, Window p_344313_) void
setSampler
(String p_173351_, Object p_173352_) private void
-
Field Details
-
SHADER_PATH
- See Also:
-
SHADER_CORE_PATH
- See Also:
-
SHADER_INCLUDE_PATH
- See Also:
-
LOGGER
static final org.slf4j.Logger LOGGER -
DUMMY_UNIFORM
-
ALWAYS_REAPPLY
private static final boolean ALWAYS_REAPPLY- See Also:
-
lastAppliedShader
-
lastProgramId
private static int lastProgramId -
samplerMap
-
samplerNames
-
samplerLocations
-
uniforms
-
uniformLocations
-
uniformMap
-
programId
private final int programId -
name
-
dirty
private boolean dirty -
vertexProgram
-
fragmentProgram
-
vertexFormat
-
MODEL_VIEW_MATRIX
-
PROJECTION_MATRIX
-
TEXTURE_MATRIX
-
SCREEN_SIZE
-
COLOR_MODULATOR
-
LIGHT0_DIRECTION
-
LIGHT1_DIRECTION
-
GLINT_ALPHA
-
FOG_START
-
FOG_END
-
FOG_COLOR
-
FOG_SHAPE
-
LINE_WIDTH
-
GAME_TIME
-
CHUNK_OFFSET
-
-
Constructor Details
-
ShaderInstance
@Deprecated public ShaderInstance(ResourceProvider p_173336_, String p_173337_, VertexFormat p_173338_) throws IOException Deprecated.- 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
-
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() -
setDefaultUniforms
public void setDefaultUniforms(VertexFormat.Mode p_343995_, org.joml.Matrix4f p_342135_, org.joml.Matrix4f p_342482_, Window p_344313_)
-