D3D_SHADER_MACRO structure (d3dcommon.h)
Defines a shader macro.
Syntax
typedef struct _D3D_SHADER_MACRO {
LPCSTR Name;
LPCSTR Definition;
} D3D_SHADER_MACRO, *LPD3D_SHADER_MACRO;
Members
Name
The macro name.
Definition
The macro definition.
Remarks
You can use shader macros in your shaders. The D3D_SHADER_MACRO structure defines a single shader macro as shown in the following example:
D3D_SHADER_MACRO Shader_Macros[] = { "zero", "0", NULL, NULL };
The following shader or effect creation functions take an array of shader macros as an input parameter:
- D3D10CompileShader
- D3DX10CreateEffectFromFile
- D3DX10PreprocessShaderFromFile
- D3DX11CreateAsyncShaderPreprocessProcessor
Requirements
Requirement | Value |
---|---|
Header | d3dcommon.h |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for