Package net.minecraft.client.renderer
Class EffectInstance
java.lang.Object
net.minecraft.client.renderer.EffectInstance
- All Implemented Interfaces:
Effect
,Shader
,AutoCloseable
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final boolean
private final BlendMode
private boolean
private static final AbstractUniform
private static final String
private final EffectProgram
private static EffectInstance
private static int
private static final org.slf4j.Logger
private final String
private final int
private final Map
<String, IntSupplier> private final EffectProgram
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply()
void
void
clear()
void
close()
int
getId()
getName()
static EffectProgram
getOrCreate
(ResourceProvider p_331503_, Program.Type p_172568_, String p_172569_) getUniform
(String p_108953_) void
static BlendMode
parseBlendNode
(com.google.gson.JsonObject p_108951_) private void
parseSamplerNode
(com.google.gson.JsonElement p_108949_) private void
parseUniformNode
(com.google.gson.JsonElement p_108959_) safeGetUniform
(String p_108961_) void
setSampler
(String p_108955_, IntSupplier p_108956_) private void
-
Field Details
-
EFFECT_SHADER_PATH
- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DUMMY_UNIFORM
-
ALWAYS_REAPPLY
private static final boolean ALWAYS_REAPPLY- See Also:
-
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
-
EffectInstance
- Throws:
IOException
-
-
Method Details
-
getOrCreate
public static EffectProgram getOrCreate(ResourceProvider p_331503_, Program.Type p_172568_, String p_172569_) 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_108949_) -
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
-
getName
-
getId
public int getId()
-