Class ShaderManager
java.lang.Object
net.minecraft.client.renderer.ShaderManager
- All Implemented Interfaces:
AutoCloseable, PreparableReloadListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordprivate static final recordprivate classprivate static final recordNested classes/interfaces inherited from interface PreparableReloadListener
PreparableReloadListener.PreparationBarrier, PreparableReloadListener.SharedState, PreparableReloadListener.StateKey<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerstatic final intprivate static final FileToIdConverterprivate final Projectionprivate final ProjectionMatrixBufferprivate ShaderManager.PostChainCachestatic final FileToIdConverterstatic final Stringstatic final Stringstatic final Stringprivate final TextureManager -
Constructor Summary
ConstructorsConstructorDescriptionShaderManager(TextureManager textureManager, Consumer<Exception> recoveryHandler) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapply(GpuDevice device, ShaderManager.PendingResults compilations) voidclose()private static CompletableFuture<List<@Nullable CompiledRenderPipeline>> compilePipelines(GpuDevice device, ShaderSource shaderSource, List<RenderPipeline> pipelines, Executor taskExecutor, Executor reloadExecutor) getName()getPostChain(Identifier id, Set<Identifier> allowedTargets) private static IdentifierincludeShaderLocationToId(Identifier location) booleanisPostEffectValid(Identifier id, Set<Identifier> allowedTargets) listAllIncludes(ResourceManager resourceManager) private static ShaderManager.ConfigsloadConfigs(ResourceManager manager) private static voidloadInclude(Identifier location, Resource resource, ImmutableMap.Builder<Identifier, ShaderSource.CachedIncludeSource> output) private static voidloadPostChain(Identifier location, Resource resource, ImmutableMap.Builder<Identifier, PostChainConfig> output) private static voidloadShader(Identifier location, Resource resource, ShaderType type, ImmutableMap.Builder<ShaderManager.ShaderSourceKey, String> output) final CompletableFuture<Void> reload(PreparableReloadListener.SharedState currentReload, Executor taskExecutor, PreparableReloadListener.PreparationBarrier preparationBarrier, Executor reloadExecutor) private voidtryTriggerRecovery(Exception exception) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PreparableReloadListener
prepareSharedState
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAX_LOG_LENGTH
public static final int MAX_LOG_LENGTH- See Also:
-
SHADER_PATH
- See Also:
-
SHADER_INCLUDE_PATH
- See Also:
-
SHADER_INCLUDE_EXTENSION
- See Also:
-
SHADER_INCLUDE_CONVERTER
-
POST_CHAIN_ID_CONVERTER
-
textureManager
-
recoveryHandler
-
postChains
-
postChainProjection
-
postChainProjectionMatrixBuffer
-
-
Constructor Details
-
ShaderManager
-
-
Method Details
-
compilePipelines
private static CompletableFuture<List<@Nullable CompiledRenderPipeline>> compilePipelines(GpuDevice device, ShaderSource shaderSource, List<RenderPipeline> pipelines, Executor taskExecutor, Executor reloadExecutor) -
loadConfigs
-
loadShader
private static void loadShader(Identifier location, Resource resource, ShaderType type, ImmutableMap.Builder<ShaderManager.ShaderSourceKey, String> output) -
loadInclude
private static void loadInclude(Identifier location, Resource resource, ImmutableMap.Builder<Identifier, ShaderSource.CachedIncludeSource> output) -
loadPostChain
private static void loadPostChain(Identifier location, Resource resource, ImmutableMap.Builder<Identifier, PostChainConfig> output) -
listAllIncludes
public static Map<Identifier, ShaderSource.CachedIncludeSource> listAllIncludes(ResourceManager resourceManager) -
includeShaderLocationToId
-
apply
-
getName
- Specified by:
getNamein interfacePreparableReloadListener
-
tryTriggerRecovery
-
isPostEffectValid
-
getPostChain
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getAvailablePostEffects