Navigation
API > API/Developer > API/Developer/ShaderPreprocessor > API/Developer/ShaderPreprocessor/PreprocessShader
References
| Module | ShaderPreprocessor |
| Header | /Engine/Source/Developer/ShaderPreprocessor/Public/ShaderPreprocessor.h |
| Include | #include "ShaderPreprocessor.h" |
| Source | /Engine/Source/Developer/ShaderPreprocessor/Private/ShaderPreprocessor.cpp |
bool PreprocessShader
&40;
FShaderPreprocessOutput & Output,
const FShaderCompilerInput & Input,
const FShaderCompilerEnvironment & MergedEnvironment,
const FShaderCompilerDefinitions & AdditionalDefines,
EDumpShaderDefines DefinesPolicy
&41;
Remarks
Preprocess a shader. Preprocess a shader. true if the shader is preprocessed without error.
Parameters
| Name | Description |
|---|---|
| Output | Preprocess output struct. Source, directives and possibly errors will be populated. |
| Input | The shader compiler input. |
| MergedEnvironment | The result of merging the Environment and SharedEnvironment from the FShaderCompilerInput (it is assumed this overload is called outside of the worker process which merges this in-place, so this merge step must be performed by the caller) |
| AdditionalDefines | Additional defines with which to preprocess the shader. |
| bShaderDumpDefinesAsCommentedCode | Whether to add shader definitions as comments. |
| OutPreprocessedShader | Upon return contains the preprocessed source code. |
| ShaderOutput | ShaderOutput to which errors can be added. |
| ShaderInput | The shader compiler input. |
| AdditionalDefines | Additional defines with which to preprocess the shader. |
| DefinesPolicy | Whether to add shader definitions as comments. |