Interface ShaderPreProcessor
- All Known Implementing Classes:
DynamicBufferProcessor,ShaderBindingProcessor,ShaderCustomProcessor,ShaderImportProcessor,ShaderLineProcessor,ShaderModifyProcessor,ShaderMultiProcessor,ShaderPredefinitionProcessor,ShaderVersionProcessor
public interface ShaderPreProcessor
Modifies the source code of a shader before compilation.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceContext for modifying source code and shader behavior. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ShaderPreProcessorallOf(ShaderPreProcessor... processors) static ShaderPreProcessorallOf(Collection<ShaderPreProcessor> processors) modify(ShaderPreProcessor.Context ctx, String source) Modifies the specified shader source input.default voidprepare()Called once when a shader is first run through the pre-processor.
-
Field Details
-
NOOP
-
UNIFORM_PATTERN
-
-
Method Details
-
prepare
default void prepare()Called once when a shader is first run through the pre-processor. -
modify
Modifies the specified shader source input.- Parameters:
ctx- 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
-
allOf
-
allOf
-