Class ShaderCustomProcessor
java.lang.Object
foundry.veil.api.client.render.shader.processor.ShaderCustomProcessor
- All Implemented Interfaces:
ShaderPreProcessor
Processes all veil custom directives.
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.shader.processor.ShaderPreProcessor
ShaderPreProcessor.Context
-
Field Summary
Fields inherited from interface foundry.veil.api.client.render.shader.processor.ShaderPreProcessor
NOOP, UNIFORM_PATTERN
-
Constructor Summary
ConstructorDescriptionShaderCustomProcessor
(net.minecraft.server.packs.resources.ResourceProvider resourceProvider) Creates a new import processor that loads import files from the specified resource provider. -
Method Summary
Modifier and TypeMethodDescriptionmodify
(ShaderPreProcessor.Context context, String source) Modifies the specified shader source input.void
prepare()
Called once when a shader is first run through the pre-processor.
-
Constructor Details
-
ShaderCustomProcessor
public ShaderCustomProcessor(net.minecraft.server.packs.resources.ResourceProvider resourceProvider) Creates a new import processor that loads import files from the specified resource provider.- Parameters:
resourceProvider
- The provider for import resources
-
-
Method Details
-
prepare
public void prepare()Description copied from interface:ShaderPreProcessor
Called once when a shader is first run through the pre-processor.- Specified by:
prepare
in interfaceShaderPreProcessor
-
modify
Description copied from interface:ShaderPreProcessor
Modifies the specified shader source input.- Specified by:
modify
in interfaceShaderPreProcessor
- Parameters:
context
- Context for modifying shaderssource
- The GLSL source code to modify- Returns:
- The modified source or the input if nothing changed
- Throws:
IOException
- If any error occurs while editing the source
-