Package net.minecraft.client.gl
Class ShaderLoader
java.lang.Object
net.minecraft.resource.SinglePreparationResourceReloader<ShaderLoader.Definitions>
net.minecraft.client.gl.ShaderLoader
- All Implemented Interfaces:
AutoCloseable,ResourceReloader
@Environment(CLIENT)
public class ShaderLoader
extends SinglePreparationResourceReloader<ShaderLoader.Definitions>
implements AutoCloseable
- Mappings:
Namespace Name named net/minecraft/client/gl/ShaderLoaderintermediary net/minecraft/class_10151official ghx
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic classprivate static final recordprivate static final recordNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ShaderLoader.Definitionsstatic final intstatic final String(package private) static final Loggerprivate static final ResourceFinderprivate final Map<Identifier, Optional<PostEffectProcessor>> private final Map<ShaderProgramKey, Optional<ShaderProgram>> private final Map<ShaderLoader.ShaderKey, CompiledShader> private static final ResourceFinderstatic final Stringprivate final TextureManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(ShaderLoader.Definitions definitions, ResourceManager resourceManager, Profiler profiler) Handles the prepared intermediate object.voidclose()private voidprivate CompiledShaderprivate CompiledShadercompile(Identifier id, CompiledShader.Type type, Defines defines) private CompiledShadercompileShader(ResourceFactory factory, Identifier id, CompiledShader.Type type, Defines defines) private static GlImportProcessorcreateImportProcessor(Map<Identifier, Resource> allResources, Identifier id) private ShaderProgramprivate ShaderProgramcreateProgram(ShaderProgramKey key, ShaderProgramDefinition definition, CompiledShader vertexShader, CompiledShader fragmentShader) getName()Returns a user-friendly name for logging.private static booleanprivate static booleanprivate static voidloadDefinition(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, ShaderProgramDefinition> builder) loadPostEffect(Identifier id, Set<Identifier> availableExternalTargets) private static voidloadPostEffect(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, PostEffectPipeline> builder) private static voidloadShaderSource(Identifier id, Resource resource, CompiledShader.Type type, Map<Identifier, Resource> allResources, ImmutableMap.Builder<ShaderLoader.ShaderSourceKey, String> builder) private PostEffectProcessorparsePostEffect(Identifier id, Set<Identifier> availableExternalTargets) voidpreload(ResourceFactory factory, ShaderProgramKey[] keys) protected ShaderLoader.Definitionsprepare(ResourceManager resourceManager, Profiler profiler) Prepares the intermediate object.Methods inherited from class net.minecraft.resource.SinglePreparationResourceReloader
reload
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/gl/ShaderLoader;LOGGER:Lorg/slf4j/Logger;intermediary field_53937Lnet/minecraft/class_10151;field_53937:Lorg/slf4j/Logger;official dLghx;d:Lorg/slf4j/Logger;
-
SHADERS_PATH
- See Also:
- Mappings:
Namespace Name Mixin selector named SHADERS_PATHLnet/minecraft/client/gl/ShaderLoader;SHADERS_PATH:Ljava/lang/String;intermediary field_53934Lnet/minecraft/class_10151;field_53934:Ljava/lang/String;official aLghx;a:Ljava/lang/String;
-
INCLUDE_PATH
- See Also:
- Mappings:
Namespace Name Mixin selector named INCLUDE_PATHLnet/minecraft/client/gl/ShaderLoader;INCLUDE_PATH:Ljava/lang/String;intermediary field_53935Lnet/minecraft/class_10151;field_53935:Ljava/lang/String;official bLghx;b:Ljava/lang/String;
-
SHADERS_FINDER
- Mappings:
Namespace Name Mixin selector named SHADERS_FINDERLnet/minecraft/client/gl/ShaderLoader;SHADERS_FINDER:Lnet/minecraft/resource/ResourceFinder;intermediary field_53938Lnet/minecraft/class_10151;field_53938:Lnet/minecraft/class_7654;official eLghx;e:Lakv;
-
POST_EFFECT_FINDER
- Mappings:
Namespace Name Mixin selector named POST_EFFECT_FINDERLnet/minecraft/client/gl/ShaderLoader;POST_EFFECT_FINDER:Lnet/minecraft/resource/ResourceFinder;intermediary field_53939Lnet/minecraft/class_10151;field_53939:Lnet/minecraft/class_7654;official fLghx;f:Lakv;
-
field_53936
public static final int field_53936- See Also:
- Mappings:
Namespace Name Mixin selector named field_53936Lnet/minecraft/client/gl/ShaderLoader;field_53936:Iintermediary field_53936Lnet/minecraft/class_10151;field_53936:Iofficial cLghx;c:I
-
textureManager
- Mappings:
Namespace Name Mixin selector named textureManagerLnet/minecraft/client/gl/ShaderLoader;textureManager:Lnet/minecraft/client/texture/TextureManager;intermediary field_53940Lnet/minecraft/class_10151;field_53940:Lnet/minecraft/class_1060;official gLghx;g:Lgxc;
-
definitions
- Mappings:
Namespace Name Mixin selector named definitionsLnet/minecraft/client/gl/ShaderLoader;definitions:Lnet/minecraft/client/gl/ShaderLoader$Definitions;intermediary field_53941Lnet/minecraft/class_10151;field_53941:Lnet/minecraft/class_10151$class_10153;official hLghx;h:Lghx$b;
-
programs
- Mappings:
Namespace Name Mixin selector named programsLnet/minecraft/client/gl/ShaderLoader;programs:Ljava/util/Map;intermediary field_53942Lnet/minecraft/class_10151;field_53942:Ljava/util/Map;official iLghx;i:Ljava/util/Map;
-
shaders
- Mappings:
Namespace Name Mixin selector named shadersLnet/minecraft/client/gl/ShaderLoader;shaders:Ljava/util/Map;intermediary field_53943Lnet/minecraft/class_10151;field_53943:Ljava/util/Map;official jLghx;j:Ljava/util/Map;
-
postEffects
- Mappings:
Namespace Name Mixin selector named postEffectsLnet/minecraft/client/gl/ShaderLoader;postEffects:Ljava/util/Map;intermediary field_53944Lnet/minecraft/class_10151;field_53944:Ljava/util/Map;official kLghx;k:Ljava/util/Map;
-
-
Constructor Details
-
ShaderLoader
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/gl/ShaderLoader;<init>(Lnet/minecraft/client/texture/TextureManager;)Vintermediary <init>Lnet/minecraft/class_10151;<init>(Lnet/minecraft/class_1060;)Vofficial <init>Lghx;<init>(Lgxc;)V
-
-
Method Details
-
prepare
Description copied from class:SinglePreparationResourceReloaderPrepares the intermediate object.This method is called in the prepare executor in a reload.
- Specified by:
preparein classSinglePreparationResourceReloader<ShaderLoader.Definitions>- Parameters:
resourceManager- the resource managerprofiler- the prepare profiler- Returns:
- the prepared object
- Mappings:
Namespace Name Mixin selector named prepareLnet/minecraft/client/gl/ShaderLoader;prepare(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)Lnet/minecraft/client/gl/ShaderLoader$Definitions;intermediary method_62942Lnet/minecraft/class_10151;method_62942(Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)Lnet/minecraft/class_10151$class_10153;official aLghx;a(Laut;Lbod;)Lghx$b;
-
loadShaderSource
private static void loadShaderSource(Identifier id, Resource resource, CompiledShader.Type type, Map<Identifier, Resource> allResources, ImmutableMap.Builder<ShaderLoader.ShaderSourceKey, String> builder) - Mappings:
Namespace Name Mixin selector named loadShaderSourceLnet/minecraft/client/gl/ShaderLoader;loadShaderSource(Lnet/minecraft/util/Identifier;Lnet/minecraft/resource/Resource;Lnet/minecraft/client/gl/CompiledShader$Type;Ljava/util/Map;Lcom/google/common/collect/ImmutableMap$Builder;)Vintermediary method_62939Lnet/minecraft/class_10151;method_62939(Lnet/minecraft/class_2960;Lnet/minecraft/class_3298;Lnet/minecraft/class_10141$class_282;Ljava/util/Map;Lcom/google/common/collect/ImmutableMap$Builder;)Vofficial aLghx;a(Lalc;Laur;Lfct$a;Ljava/util/Map;Lcom/google/common/collect/ImmutableMap$Builder;)V
-
createImportProcessor
private static GlImportProcessor createImportProcessor(Map<Identifier, Resource> allResources, Identifier id) - Mappings:
Namespace Name Mixin selector named createImportProcessorLnet/minecraft/client/gl/ShaderLoader;createImportProcessor(Ljava/util/Map;Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/gl/GlImportProcessor;intermediary method_62950Lnet/minecraft/class_10151;method_62950(Ljava/util/Map;Lnet/minecraft/class_2960;)Lnet/minecraft/class_5913;official aLghx;a(Ljava/util/Map;Lalc;)Lfck;
-
loadDefinition
private static void loadDefinition(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, ShaderProgramDefinition> builder) - Mappings:
Namespace Name Mixin selector named loadDefinitionLnet/minecraft/client/gl/ShaderLoader;loadDefinition(Lnet/minecraft/util/Identifier;Lnet/minecraft/resource/Resource;Lcom/google/common/collect/ImmutableMap$Builder;)Vintermediary method_62938Lnet/minecraft/class_10151;method_62938(Lnet/minecraft/class_2960;Lnet/minecraft/class_3298;Lcom/google/common/collect/ImmutableMap$Builder;)Vofficial aLghx;a(Lalc;Laur;Lcom/google/common/collect/ImmutableMap$Builder;)V
-
loadPostEffect
private static void loadPostEffect(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, PostEffectPipeline> builder) - Mappings:
Namespace Name Mixin selector named loadPostEffectLnet/minecraft/client/gl/ShaderLoader;loadPostEffect(Lnet/minecraft/util/Identifier;Lnet/minecraft/resource/Resource;Lcom/google/common/collect/ImmutableMap$Builder;)Vintermediary method_62953Lnet/minecraft/class_10151;method_62953(Lnet/minecraft/class_2960;Lnet/minecraft/class_3298;Lcom/google/common/collect/ImmutableMap$Builder;)Vofficial bLghx;b(Lalc;Laur;Lcom/google/common/collect/ImmutableMap$Builder;)V
-
isDefinition
- Mappings:
Namespace Name Mixin selector named isDefinitionLnet/minecraft/client/gl/ShaderLoader;isDefinition(Lnet/minecraft/util/Identifier;)Zintermediary method_62937Lnet/minecraft/class_10151;method_62937(Lnet/minecraft/class_2960;)Zofficial aLghx;a(Lalc;)Z
-
isShaderSource
- Mappings:
Namespace Name Mixin selector named isShaderSourceLnet/minecraft/client/gl/ShaderLoader;isShaderSource(Lnet/minecraft/util/Identifier;)Zintermediary method_62952Lnet/minecraft/class_10151;method_62952(Lnet/minecraft/class_2960;)Zofficial bLghx;b(Lalc;)Z
-
apply
protected void apply(ShaderLoader.Definitions definitions, ResourceManager resourceManager, Profiler profiler) Description copied from class:SinglePreparationResourceReloaderHandles the prepared intermediate object.This method is called in the apply executor, or the game engine, in a reload.
- Specified by:
applyin classSinglePreparationResourceReloader<ShaderLoader.Definitions>- Parameters:
definitions- the prepared objectresourceManager- the resource managerprofiler- the apply profiler- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/client/gl/ShaderLoader;apply(Lnet/minecraft/client/gl/ShaderLoader$Definitions;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)Vintermediary method_62945Lnet/minecraft/class_10151;method_62945(Lnet/minecraft/class_10151$class_10153;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)Vofficial aLghx;a(Lghx$b;Laut;Lbod;)V
-
getName
Returns a user-friendly name for logging.- Specified by:
getNamein interfaceResourceReloader- Mappings:
Namespace Name Mixin selector named getNameLnet/minecraft/resource/ResourceReloader;getName()Ljava/lang/String;intermediary method_22322Lnet/minecraft/class_3302;method_22322()Ljava/lang/String;official cLaun;c()Ljava/lang/String;
-
preload
public void preload(ResourceFactory factory, ShaderProgramKey[] keys) throws IOException, ShaderLoader.LoadException - Throws:
IOExceptionShaderLoader.LoadException- Mappings:
Namespace Name Mixin selector named preloadLnet/minecraft/client/gl/ShaderLoader;preload(Lnet/minecraft/resource/ResourceFactory;[Lnet/minecraft/client/gl/ShaderProgramKey;)Vintermediary method_62944Lnet/minecraft/class_10151;method_62944(Lnet/minecraft/class_5912;[Lnet/minecraft/class_10156;)Vofficial aLghx;a(Lauw;[Lghy;)V
-
compileShader
private CompiledShader compileShader(ResourceFactory factory, Identifier id, CompiledShader.Type type, Defines defines) throws IOException, ShaderLoader.LoadException - Throws:
IOExceptionShaderLoader.LoadException- Mappings:
Namespace Name Mixin selector named compileShaderLnet/minecraft/client/gl/ShaderLoader;compileShader(Lnet/minecraft/resource/ResourceFactory;Lnet/minecraft/util/Identifier;Lnet/minecraft/client/gl/CompiledShader$Type;Lnet/minecraft/client/gl/Defines;)Lnet/minecraft/client/gl/CompiledShader;intermediary method_62943Lnet/minecraft/class_10151;method_62943(Lnet/minecraft/class_5912;Lnet/minecraft/class_2960;Lnet/minecraft/class_10141$class_282;Lnet/minecraft/class_10149;)Lnet/minecraft/class_10141;official aLghx;a(Lauw;Lalc;Lfct$a;Lghw;)Lfct;
-
getOrCreateProgram
- Mappings:
Namespace Name Mixin selector named getOrCreateProgramLnet/minecraft/client/gl/ShaderLoader;getOrCreateProgram(Lnet/minecraft/client/gl/ShaderProgramKey;)Lnet/minecraft/client/gl/ShaderProgram;intermediary method_62947Lnet/minecraft/class_10151;method_62947(Lnet/minecraft/class_10156;)Lnet/minecraft/class_5944;official aLghx;a(Lghy;)Lggp;
-
createProgram
- Throws:
ShaderLoader.LoadException- Mappings:
Namespace Name Mixin selector named createProgramLnet/minecraft/client/gl/ShaderLoader;createProgram(Lnet/minecraft/client/gl/ShaderProgramKey;)Lnet/minecraft/client/gl/ShaderProgram;intermediary method_62955Lnet/minecraft/class_10151;method_62955(Lnet/minecraft/class_10156;)Lnet/minecraft/class_5944;official bLghx;b(Lghy;)Lggp;
-
createProgram
private ShaderProgram createProgram(ShaderProgramKey key, ShaderProgramDefinition definition, CompiledShader vertexShader, CompiledShader fragmentShader) throws ShaderLoader.LoadException - Throws:
ShaderLoader.LoadException- Mappings:
Namespace Name Mixin selector named createProgramLnet/minecraft/client/gl/ShaderLoader;createProgram(Lnet/minecraft/client/gl/ShaderProgramKey;Lnet/minecraft/client/gl/ShaderProgramDefinition;Lnet/minecraft/client/gl/CompiledShader;Lnet/minecraft/client/gl/CompiledShader;)Lnet/minecraft/client/gl/ShaderProgram;intermediary method_62948Lnet/minecraft/class_10151;method_62948(Lnet/minecraft/class_10156;Lnet/minecraft/class_10157;Lnet/minecraft/class_10141;Lnet/minecraft/class_10141;)Lnet/minecraft/class_5944;official aLghx;a(Lghy;Lghz;Lfct;Lfct;)Lggp;
-
compile
private CompiledShader compile(Identifier id, CompiledShader.Type type, Defines defines) throws ShaderLoader.LoadException - Throws:
ShaderLoader.LoadException- Mappings:
Namespace Name Mixin selector named compileLnet/minecraft/client/gl/ShaderLoader;compile(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/gl/CompiledShader$Type;Lnet/minecraft/client/gl/Defines;)Lnet/minecraft/client/gl/CompiledShader;intermediary method_62940Lnet/minecraft/class_10151;method_62940(Lnet/minecraft/class_2960;Lnet/minecraft/class_10141$class_282;Lnet/minecraft/class_10149;)Lnet/minecraft/class_10141;official aLghx;a(Lalc;Lfct$a;Lghw;)Lfct;
-
compile
- Throws:
ShaderLoader.LoadException- Mappings:
Namespace Name Mixin selector named compileLnet/minecraft/client/gl/ShaderLoader;compile(Lnet/minecraft/client/gl/ShaderLoader$ShaderKey;)Lnet/minecraft/client/gl/CompiledShader;intermediary method_62946Lnet/minecraft/class_10151;method_62946(Lnet/minecraft/class_10151$class_10154;)Lnet/minecraft/class_10141;official aLghx;a(Lghx$c;)Lfct;
-
loadPostEffect
@Nullable public @Nullable PostEffectProcessor loadPostEffect(Identifier id, Set<Identifier> availableExternalTargets) - Mappings:
Namespace Name Mixin selector named loadPostEffectLnet/minecraft/client/gl/ShaderLoader;loadPostEffect(Lnet/minecraft/util/Identifier;Ljava/util/Set;)Lnet/minecraft/client/gl/PostEffectProcessor;intermediary method_62941Lnet/minecraft/class_10151;method_62941(Lnet/minecraft/class_2960;Ljava/util/Set;)Lnet/minecraft/class_279;official aLghx;a(Lalc;Ljava/util/Set;)Lghk;
-
parsePostEffect
private PostEffectProcessor parsePostEffect(Identifier id, Set<Identifier> availableExternalTargets) throws ShaderLoader.LoadException - Throws:
ShaderLoader.LoadException- Mappings:
Namespace Name Mixin selector named parsePostEffectLnet/minecraft/client/gl/ShaderLoader;parsePostEffect(Lnet/minecraft/util/Identifier;Ljava/util/Set;)Lnet/minecraft/client/gl/PostEffectProcessor;intermediary method_62954Lnet/minecraft/class_10151;method_62954(Lnet/minecraft/class_2960;Ljava/util/Set;)Lnet/minecraft/class_279;official bLghx;b(Lalc;Ljava/util/Set;)Lghk;
-
closeLoader
private void closeLoader()- Mappings:
Namespace Name Mixin selector named closeLoaderLnet/minecraft/client/gl/ShaderLoader;closeLoader()Vintermediary method_62936Lnet/minecraft/class_10151;method_62936()Vofficial aLghx;a()V
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-