From 0f3196742401a6871f41f9bbacf5cbbf33883c5c Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 2 Mar 2021 12:59:46 -0800 Subject: Added shader compiler macros to shader source --- Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp index 49566626..322ccd50 100644 --- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp +++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp @@ -124,8 +124,10 @@ static HRESULT CompileShader(const char* Source, } } + D3D_SHADER_MACRO Macros[] = {{"D3DCOMPILER", ""}, {}}; + D3DIncludeImpl IncludeImpl{ShaderCI.pShaderSourceStreamFactory}; - return D3DCompile(Source, SourceLength, NULL, nullptr, &IncludeImpl, ShaderCI.EntryPoint, profile, dwShaderFlags, 0, ppBlobOut, ppCompilerOutput); + return D3DCompile(Source, SourceLength, nullptr, Macros, &IncludeImpl, ShaderCI.EntryPoint, profile, dwShaderFlags, 0, ppBlobOut, ppCompilerOutput); } ShaderD3DBase::ShaderD3DBase(const ShaderCreateInfo& ShaderCI, const ShaderVersion ShaderModel, IDXCompiler* DxCompiler) -- cgit v1.2.3