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
Modifier and TypeInterfaceDescriptionstatic interface
Context for modifying source code and shader behavior. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShaderPreProcessor
allOf
(ShaderPreProcessor... processors) static ShaderPreProcessor
allOf
(Collection<ShaderPreProcessor> processors) modify
(ShaderPreProcessor.Context ctx, String source) Modifies the specified shader source input.default void
prepare()
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
-