Package net.minecraft.client.shader
Class ShaderInstance
java.lang.Object
net.minecraft.client.shader.ShaderInstance
- All Implemented Interfaces:
AutoCloseable
,IShaderManager
-
Field Summary
Modifier and TypeFieldDescriptionprivate final JSONBlendingMode
private boolean
private static final ShaderDefault
private final ShaderLoader
private static ShaderInstance
private static int
private static final org.apache.logging.log4j.Logger
private final String
private final int
private final Map<String,
IntSupplier> private final Map<String,
ShaderUniform> private final List<ShaderUniform>
private final ShaderLoader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply()
void
clear()
void
close()
int
getId()
static ShaderLoader
getOrCreate
(IResourceManager p_216542_0_, ShaderLoader.ShaderType p_216542_1_, String p_216542_2_) getUniform
(String p_216539_1_) void
static JSONBlendingMode
parseBlendNode
(com.google.gson.JsonObject p_216543_0_) private void
parseSamplerNode
(com.google.gson.JsonElement p_216541_1_) private void
parseUniformNode
(com.google.gson.JsonElement p_216540_1_) safeGetUniform
(String p_216538_1_) void
setSampler
(String p_216537_1_, IntSupplier p_216537_2_) private void
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
DUMMY_UNIFORM
-
lastAppliedEffect
-
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
-
-
Constructor Details
-
ShaderInstance
- Throws:
IOException
-
-
Method Details
-
getOrCreate
public static ShaderLoader getOrCreate(IResourceManager p_216542_0_, ShaderLoader.ShaderType p_216542_1_, String p_216542_2_) 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()- Specified by:
markDirty
in interfaceIShaderManager
-
getUniform
-
safeGetUniform
-
updateLocations
private void updateLocations() -
parseSamplerNode
private void parseSamplerNode(com.google.gson.JsonElement p_216541_1_) -
setSampler
-
parseUniformNode
- Throws:
JSONException
-
getVertexProgram
- Specified by:
getVertexProgram
in interfaceIShaderManager
-
getFragmentProgram
- Specified by:
getFragmentProgram
in interfaceIShaderManager
-
getId
public int getId()- Specified by:
getId
in interfaceIShaderManager
-