summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/d3d11/ShaderPatchingD3D11.h
blob: 51b28541d8f1c1304c59b950facc0d8966d652a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);