summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h')
-rw-r--r--Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h24
1 files changed, 24 insertions, 0 deletions
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<UInt8>& byteCode);
+bool PatchPixelShaderFogD3D11 (dynamic_array<UInt8>& byteCode, FogMode fog);
+
+bool PatchRemovePartialPrecisionD3D11 (dynamic_array<UInt8>& byteCode);
+
+bool PatchRemovePartialPrecisionD3D11 (dynamic_array<UInt8>& byteCode);