From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h (limited to 'Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h') diff --git a/Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h b/Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h new file mode 100644 index 0000000..51b2854 --- /dev/null +++ b/Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h @@ -0,0 +1,24 @@ +#pragma once + +#include "Runtime/GfxDevice/GfxDeviceTypes.h" +#include "Runtime/Utilities/dynamic_array.h" + +enum { + k11FogColor = 0, + k11FogParams = 1, + k11FogSize = 2 +}; + +enum { + // DX11 has 14 constant buffers, and for safety reasons + // let's use 3rd to last one, 11. If that is already + // in use by shader, there will be no fog. + k11FogConstantBufferBind = 11, +}; + +bool PatchVertexOrDomainShaderFogD3D11 (dynamic_array& byteCode); +bool PatchPixelShaderFogD3D11 (dynamic_array& byteCode, FogMode fog); + +bool PatchRemovePartialPrecisionD3D11 (dynamic_array& byteCode); + +bool PatchRemovePartialPrecisionD3D11 (dynamic_array& byteCode); -- cgit v1.1-26-g67d0