namespace new in Git master
ShaderToolsShader tools.
Shader validation, conversion, compilation and reflection.
This library is built if MAGNUM_WITH_SHADERTOOLS
is enabled when building Magnum. To use this library with CMake, request the ShaderTools
component of the Magnum
package and link to the Magnum::ShaderTools
target:
find_package(Magnum REQUIRED ShaderTools) # ... target_link_libraries(your-app PRIVATE Magnum::ShaderTools)
Additional plugins and utilities are built separately. See particular *Converter
class documentation, the magnum-shaderconverter utility documentation, Downloading and building, Downloading and building plugins, Usage with CMake, Plugin usage with CMake and Loading and using plugins for more information.
Classes
- class AbstractConverter new in Git master
- Base for shader converter plugins.
- class AnyConverter new in Git master
- Any shader converter plugin.
- class GlslangConverter new in Git master
- Glslang shader converter plugin.
- class SpirvToolsConverter new in Git master
- SPIRV-Tools shader converter plugin.
Enums
- enum class ConverterFeature: UnsignedInt { ValidateFile = 1 << 0, ValidateData = ValidateFile|(1 << 1), ConvertFile = 1 << 2, ConvertData = ConvertFile|(1 << 3), LinkFile = 1 << 4, LinkData = LinkFile|(1 << 5), InputFileCallback = 1 << 6, Preprocess = 1 << 7, Optimize = 1 << 8, DebugInfo = 1 << 9 } new in Git master
- Features supported by a shader converter.
- enum class ConverterFlag: UnsignedInt { Quiet = 1 << 0, Verbose = 1 << 1, WarningAsError = 1 << 2, PreprocessOnly = 1 << 3 } new in Git master
- Shader converter flag.
- enum class Format: UnsignedInt { Unspecified = 0, Glsl, Spirv, SpirvAssembly, Hlsl, Msl, Wgsl, Dxil } new in Git master
- Shader format.
- enum class Stage: UnsignedInt { Unspecified = 0, Vertex, Fragment, Geometry, TessellationControl, TessellationEvaluation, Compute, RayGeneration, RayAnyHit, RayClosestHit, RayMiss, RayIntersection, RayCallable, MeshTask, Mesh, Kernel } new in Git master
- Shader stage.
Typedefs
-
using ConverterFeatures = Containers::
EnumSet<ConverterFeature> new in Git master - Features supported by a shader converter.
-
using ConverterFlags = Containers::
EnumSet<ConverterFlag> new in Git master - Shader converter flags.
Functions
- auto operator<<(Debug& debug, ConverterFeature value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, ConverterFeatures value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, ConverterFlag value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, ConverterFlags value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, Format value) -> Debug& new in Git master
- Debug output operator.
- auto operator<<(Debug& debug, Stage value) -> Debug& new in Git master
- Debug output operator.
Enum documentation
enum class Magnum:: ShaderTools:: ConverterFeature: UnsignedInt new in Git master
Features supported by a shader converter.
enum class Magnum:: ShaderTools:: ConverterFlag: UnsignedInt new in Git master
Shader converter flag.
Enumerators | |
---|---|
Quiet |
Suppress warnings, print just errors. By default the converter prints both warnings and errors. Corresponds to the |
Verbose |
Print verbose diagnostic. By default the converter only prints warnings and errors. Corresponds to the |
WarningAsError |
Treat warnings as error. By default, if a warning occurs, validation or conversion succeeds. With this flag set, it fails. Corresponds to the |
PreprocessOnly |
Only run the preprocessor. Available only if the converter supports ConverterFeature:: |
enum class Magnum:: ShaderTools:: Format: UnsignedInt new in Git master
Shader format.
Describes input and output shader format.
Enumerators | |
---|---|
Unspecified |
Either leaves format detection up to the implementation or describes a format not fitting into any other categories. This includes various application-specific languages and language flavors, compressed or encrypted data and other. This value is guaranteed to be |
Glsl | |
Spirv | |
SpirvAssembly |
Textual representation of SPIR-V. |
Hlsl |
HLSL (High-Level Shading Language), used in D3D |
Msl |
MSL (Metal Shading Language) |
Wgsl |
WGSL (WebGPU Shading Language) |
Dxil |
DXIL (DirectX Intermediate Language), produced by DirectX Shader Compiler |
enum class Magnum:: ShaderTools:: Stage: UnsignedInt new in Git master
#include <Magnum/ShaderTools/Stage.h>
Shader stage.
Enumerators | |
---|---|
Unspecified |
Unspecified stage. When used in the AbstractConverter:: This value is guaranteed to be |
Vertex |
Vertex stage |
Fragment |
Fragment stage |
Geometry |
Geometry stage |
TessellationControl |
Tessellation control stage |
TessellationEvaluation |
Tessellation evaluation stage |
Compute |
Compute stage |
RayGeneration |
Ray generation stage |
RayAnyHit |
Ray any hit stage |
RayClosestHit |
Ray closest hit stage |
RayMiss |
Ray miss stage |
RayIntersection |
Ray intersection stage |
RayCallable |
Ray callable stage |
MeshTask |
Mesh task stage |
Mesh |
Mesh stage |
Kernel |
Compute kernel. Compared to Stage:: |
Typedef documentation
typedef Containers:: EnumSet<ConverterFeature> Magnum:: ShaderTools:: ConverterFeatures new in Git master
Features supported by a shader converter.
typedef Containers:: EnumSet<ConverterFlag> Magnum:: ShaderTools:: ConverterFlags new in Git master
Shader converter flags.
Function documentation
Debug& Magnum:: ShaderTools:: operator<<(Debug& debug,
ConverterFeature value) new in Git master
Debug output operator.
Debug& Magnum:: ShaderTools:: operator<<(Debug& debug,
ConverterFeatures value) new in Git master
Debug output operator.
Debug& Magnum:: ShaderTools:: operator<<(Debug& debug,
ConverterFlag value) new in Git master
Debug output operator.
Debug& Magnum:: ShaderTools:: operator<<(Debug& debug,
ConverterFlags value) new in Git master
Debug output operator.
Debug& Magnum:: ShaderTools:: operator<<(Debug& debug,
Format value) new in Git master
Debug output operator.
Debug& Magnum:: ShaderTools:: operator<<(Debug& debug,
Stage value) new in Git master
#include <Magnum/ShaderTools/Stage.h>
Debug output operator.