Shader compiler interface. Custom shader compiles need to derive from this class and implement the pure virtual interface functions. Instances are created via reflection so each implementation must be properly reflected.
More...
#include <ShaderCompiler.h>
|
static const ezRTTI * | GetStaticRTTI () |
|
Shader compiler interface. Custom shader compiles need to derive from this class and implement the pure virtual interface functions. Instances are created via reflection so each implementation must be properly reflected.
◆ Compile()
Compiles the shader comprised of multiple stages defined in inout_data.
- Parameters
-
inout_data | The state of the shader compiler. m_Resources and m_ByteCode should be written to on successful return code. |
pLog | Logging interface to be used when outputting any errors. |
- Returns
- Returns whether the shader was compiled successfully. On failure, errors should be written to pLog.
Implemented in ezShaderCompilerHLSL, and ezShaderCompilerDXC.
◆ GetSupportedPlatforms()
virtual void ezShaderProgramCompiler::GetSupportedPlatforms |
( |
ezHybridArray< ezString, 4 > & |
out_platforms | ) |
|
|
pure virtual |
◆ ModifyShaderSource()
Allows the shader compiler to modify the shader source before hashing and compiling. This allows it to implement custom features by injecting code before the compile process. Mostly used to define resource bindings that do not cause conflicts across shader stages.
- Parameters
-
inout_data | The state of the shader compiler. Only m_sShaderSource should be modified by the implementation. |
pLog | Logging interface to be used when outputting any errors. |
- Returns
- Returns whether the shader could be modified. On failure, the shader won't be compiled.
Implemented in ezShaderCompilerHLSL, and ezShaderCompilerDXC.
The documentation for this class was generated from the following file:
- /home/runner/work/ezEngine/ezEngine/Code/Engine/RendererCore/ShaderCompiler/ShaderCompiler.h