Shader compilation flags enumeration.
More...
#include <ShaderFlags.h>
Shader compilation flags enumeration.
- See also
- ShaderDescriptor::flags
- Todo
- Rename to CompileFlags.
◆ anonymous enum
| Enumerator |
|---|
| Debug | Generate debug information.
- Note
- Only supported with: HLSL, Metal.
|
| NoOptimization | Disable optimizations.
- Note
- Only supported with: HLSL, Metal, GLSL (adds #pragma optimize(off) after the #version-directive).
|
| OptimizationLevel1 | Optimization level 1.
- Note
- Only supported with: HLSL, Metal.
|
| OptimizationLevel2 | Optimization level 2.
- Note
- Only supported with: HLSL, Metal.
|
| OptimizationLevel3 | Optimization level 3.
- Note
- Only supported with: HLSL, Metal.
|
| WarningsAreErrors | Warnings are treated as errors.
- Note
- Only supported with: HLSL, Metal.
|
| PatchClippingOrigin | Patches the GLSL shader source to accommodate a flipped coordinate system from lower-left to upper-left and vice-versa, effectively injecting gl_Position.y = -gl_Position.y; statements into a vertex shader.
- Note
- Since there is no preprocessing performed prior to scanning the shader source, control-flow modifying macros are not recognized. For example, using macros that change the control flow in the main entry point or even obfuscate the declaration of the entry point will not be scanned correctly by this feature. If in doubt, write your own adjustment in the shader source like this:
void main() {
#if FLIP_POSITION_Y
gl_Position.y = -gl_Position.y;
#endif
}
Then define the macro FLIP_POSITION_Y on the API side like this and pass it to all vertex (or tessellation-evaluation or geometry) shaders that will be used for render targets, i.e. those shaders that render into a texture instead of a Window or Canvas:
{ nullptr, nullptr }
};
@ LowerLeft Specifies a screen origin in the lower-left. Definition RenderSystemFlags.h:135
Shader macro structure with name and optional body definition. Definition ShaderFlags.h:263
-
Only supported with: GLSL.
- See also
- RenderingCapabilities::screenOrigin
|
| SeparateShader | Specifies whether to create separable or legacy shaders.
- See also
- https://registry.khronos.org/OpenGL/extensions/ARB/ARB_separate_shader_objects.txt
- Note
- Only supported with: GLSL.
|
| DefaultLibrary | Specifies whether to load the shader from the default.metallib file.
- Note
- Only supported with: Metal.
|
| CaseInsensitiveAttribs | Specifies whether input/output attributes should be treated case insensitive.
- Note
- Only supported with: OpenGL.
|
The documentation for this struct was generated from the following file: